SlideShare a Scribd company logo
1 of 38
Download to read offline
Making Postgres Central in Your Data Center
BRUCE MOMJIAN
February, 2014
This talk explores why Postgres is uniquely capable of functioning
as a central database in enterprises. Title concept from Josh Berkus
Creative Commons Attribution License http://momjian.us/presentations
1 / 38
Outline
1. Object-Relational (extensibility)
2. NoSQL
3. Data analytics
4. Foreign data wrappers (database federation)
5. Central role
Making Postgres Central in Your Data Center 2 / 38
1. Object-Relational (Extensibility)
Object-relational databases like Postgres support support classes
and inheritance, but most importantly, they define database
functionality as objects that can be easily manipulated.
http://en.wikipedia.org/wiki/Object-relational_database
Making Postgres Central in Your Data Center 3 / 38
How Is this Accomplished?
starelid
staattnum
staop
pg_statistic
oprleft
oprright
oprresult
oprcom
oprnegate
oprlsortop
oprrsortop
oprcode
oprrest
oprjoin
pg_operator
typrelid
typelem
typinput
typoutput
typbasetype
pg_type
prolang
prorettype
pg_proc
pg_rewrite
ev_class
datlastsysoid
pg_database
tgfoid
tgrelid
pg_trigger
inhrelid
pg_inherits
inhparent
pg_language
pg_namespacepg_depend pg_shadow
pg_aggregate
aggfinalfn
aggtransfn
aggfnoid
aggtranstype
castsource
casttarget
pg_cast
castfunc
pg_description
pg_constraint
contypid
pg_conversion
conproc
amopopr
amopclaid
pg_attribute
indexrelid
attnum
amopclaid
atttypid
indrelid
pg_attrdef
pg_group
adrelid
pg_index
adnum
pg_am
pg_amop
amgettuple
reltoastidxid
aminsert
reltoastrelid amcostestimate
amproc
ambeginscan
pg_amproc
amrescan
relfilenode
amendscan
relam
ammarkpos
reltype amrestrpos
pg_class
ambuild
opcdeftype
ambulkdelete
pg_opclass
attrelid
http://www.postgresql.org/docs/current/static/catalogs.html
Making Postgres Central in Your Data Center 4 / 38
Example: ISBN Data Type
CREATE EXTENSION isn;
dT
List of data types
Schema | Name | Description
--------+--------+--------------------------------------------------
public | ean13 | International European Article Number (EAN13)
public | isbn | International Standard Book Number (ISBN)
public | isbn13 | International Standard Book Number 13 (ISBN13)
public | ismn | International Standard Music Number (ISMN)
public | ismn13 | International Standard Music Number 13 (ISMN13)
public | issn | International Standard Serial Number (ISSN)
public | issn13 | International Standard Serial Number 13 (ISSN13)
public | upc | Universal Product Code (UPC)
http://www.postgresql.org/docs/current/static/isn.html
Making Postgres Central in Your Data Center 5 / 38
ISBN Behaves Just Like Built-In Types
dTS
…
pg_catalog | integer | -2 billion to 2 billion integer, 4-byte storage
…
public | isbn | International Standard Book Number (ISBN)
Making Postgres Central in Your Data Center 6 / 38
The System Catalog Entry for INTEGER
SELECT * FROM pg_type WHERE typname = ’int4’;
-[ RECORD 1 ]--+---------
typname | int4
typnamespace | 11
typowner | 10
typlen | 4
typbyval | t
typtype | b
typcategory | N
typispreferred | f
typisdefined | t
typdelim | ,
typrelid | 0
typelem | 0
typarray | 1007
typinput | int4in
typoutput | int4out
typreceive | int4recv
typsend | int4send
typmodin | -
typmodout | -
typanalyze | -
typalign | i
typstorage | p
typnotnull | f Making Postgres Central in Your Data Center 7 / 38
The System Catalog Entry for ISBN
SELECT * FROM pg_type WHERE typname = ’isbn’;
-[ RECORD 1 ]--+---------------
typname | isbn
typnamespace | 2200
typowner | 10
typlen | 8
typbyval | t
typtype | b
typcategory | U
typispreferred | f
typisdefined | t
typdelim | ,
typrelid | 0
typelem | 0
typarray | 16405
typinput | isbn_in
typoutput | public.isn_out
typreceive | -
typsend | -
typmodin | -
typmodout | -
typanalyze | -
typalign | d
typstorage | p
typnotnull | f Making Postgres Central in Your Data Center 8 / 38
Not Just Data Types, Languages
CREATE EXTENSION plpythonu;
dL
List of languages
Name | Owner | Trusted | Description
-----------+----------+---------+------------------------------------------
plpgsql | postgres | t | PL/pgSQL procedural language
plpythonu | postgres | f | PL/PythonU untrusted procedural language
http://www.postgresql.org/docs/current/static/plpython.html
Making Postgres Central in Your Data Center 9 / 38
Available Languages
◮ PL/Java
◮ PL/Perl
◮ PL/pgSQL (like PL/SQL)
◮ PL/PHP
◮ PL/Python.
◮ PL/R (like SPSS)
◮ PL/Ruby
◮ PL/Scheme
◮ PL/sh
◮ PL/Tcl
◮ SPI (C)
http://www.postgresql.org/docs/current/static/external-pl.html
Making Postgres Central in Your Data Center 10 / 38
Specialized Indexing Methods
◮ BTree
◮ Hash
◮ GiST (generalized search tree)
◮ SP-GiST (space-partitioned GiST)
◮ GIN (generalized inverted index)
http://www.postgresql.org/docs/current/static/indexam.html
Making Postgres Central in Your Data Center 11 / 38
Index Types Are Defined in the System Catalogs Too
SELECT amname FROM pg_am;
amname
--------
btree
hash
gist
gin
spgist
http://www.postgresql.org/docs/current/static/catalog-pg-am.html
Making Postgres Central in Your Data Center 12 / 38
Operators Have Similar Flexibility
Operators are function calls with left and right operators of specified types:
doS
Schema | Name | Left arg type | Right arg type | Result type | Description
…
pg_catalog | + | integer | integer | integer | add
dfS
Schema | Name | Result data type | Argument data types | Type
…
pg_catalog | int4pl | integer | integer, integer | normal
Making Postgres Central in Your Data Center 13 / 38
Other Extensibility
◮ Casts are defined in pg_cast, int4(float8)
◮ Aggregates are defined in pg_aggregate, sum(int4)
Making Postgres Central in Your Data Center 14 / 38
Externally Developed Plug-Ins
◮ PostGIS (Geographical Information System)
◮ PL/v8 (server-side JavaScript)
◮ experimentation, e.g. full text search was originally
externally developed
Making Postgres Central in Your Data Center 15 / 38
Offshoots of Postgres
◮ AsterDB
◮ Greenplum
◮ Informix
◮ Netezza
◮ ParAccel
◮ Postgres XC
◮ Redshift (Amazon)
◮ Truviso
◮ Vertica
◮ Yahoo! Everest
https://wiki.postgresql.org/wiki/PostgreSQL_derived_databases
http://de.slideshare.net/pgconf/elephant-roads-a-tour-of-postgres-forks
Making Postgres Central in Your Data Center 16 / 38
Offshoots of Postgres
https://raw.github.com/daamien/artwork/master/inkscape/PostgreSQL_timeline/timeline_postgresql.png
Making Postgres Central in Your Data Center 17 / 38
Plug-In Is Not a Bad Word
Many databases treat extensions as special cases, with serious
limitations. Postgres built-ins use the same API as extensions, so ll
extensions operate just like built-in functionality.
Making Postgres Central in Your Data Center 18 / 38
Extensions and Built-In Facilities
Behave the Same
Extensions
PL/R
ISN
PostGIS
Postgres System Tables
int4
btree
sum()
PL/pgSQL
Making Postgres Central in Your Data Center 19 / 38
2. NoSQL
SQL
Making Postgres Central in Your Data Center 20 / 38
NoSQL Types
There is no single NoSQL technology. They all take different
approaches and have different features and drawbacks:
◮ Key-Value stores, e.g. Redis
◮ Document databases, e.g. MongoDB (JSON)
◮ Columnar stores: Cassandra
◮ Graph databases: Neo4j
Making Postgres Central in Your Data Center 21 / 38
Why NoSQL Exists
Generally, NoSQL provides fast querying, auto-sharding, and
flexible schemas by avoiding:
◮ A powerful query language
◮ A sophisticated query optimizer
◮ Data normalization
◮ Joins
◮ Referential integrity
◮ Durability
Making Postgres Central in Your Data Center 22 / 38
Are These Drawbacks Worth the Cost?
◮ Difficult Reporting Data must be brought to the client for
analysis, e.g. no aggregates or data analysis functions.
Schema-less data requires complex client-side knowledge for
processing
◮ Complex Application Design Without powerful query
language and query optimizer, the client software is
responsible for efficiently accessing data and for data
consistency
◮ Durability Administrators are responsible for data retention
Making Postgres Central in Your Data Center 23 / 38
When Should NoSQL Be Used?
◮ Massive write scaling is required, more than a single server
can provide
◮ Only simple data access pattern is required
◮ Additional resources allocation for development is acceptable
◮ Strong data retention or transactional guarantees are not
required
◮ Unstructured duplicate data that greatly benefits from
column compression
Making Postgres Central in Your Data Center 24 / 38
When Should Relational Storage Be Used?
◮ Easy administration
◮ Variable workloads and reporting
◮ Simplified application development
◮ Strong data retention
Making Postgres Central in Your Data Center 25 / 38
The Best of Both Worlds: Postgres
Postgres has many NoSQL features without the drawbacks:
◮ Schema-less data types, with sophisticated indexing support
◮ Transactional schema changes with rapid additional and
removal of columns
◮ Durability by default, but controllable per-table or
per-transaction
◮ Postgres XC and PL/Proxy allow auto-sharding for write
scaling
Making Postgres Central in Your Data Center 26 / 38
Schema-Less Data: JSON
CREATE TABLE customer (id SERIAL, data JSON);
INSERT INTO customer VALUES (DEFAULT, ’{"name" : "Bill", "age" : 21}’);
SELECT data->’name’ FROM customer WHERE (data->’age’)::text = ’21’;
?column?
----------
"Bill"
Making Postgres Central in Your Data Center 27 / 38
Easy Relational Schema Changes
ALTER TABLE customer ADD COLUMN status CHAR(1);
BEGIN WORK;
ALTER TABLE customer ADD COLUMN debt_limit NUMERIC(10,2);
ALTER TABLE customer ADD COLUMN creation_date TIMESTAMP WITH TIME ZONE;
ALTER TABLE customer RENAME TO cust;
COMMIT;
Making Postgres Central in Your Data Center 28 / 38
3. Data Analytics
◮ Aggregates
◮ Optimizer
◮ Server-side languages, e.g. PL/R
◮ Window functions
◮ Bitmap heap scans
◮ Tablespaces
◮ Data partitioning
◮ Materialized views
◮ Common (recursive) table expressions
◮ Min/Max indexes (coming in 2015)
Data warehouse-specific solutions are required for parallel
operations across servers.
http://www.slideshare.net/PGExperts/really-big-elephants-postgresql-dw-15833438
http://wiki.postgresql.org/images/3/38/PGDay2009-EN-Datawarehousing_with_PostgreSQL.pdf
Making Postgres Central in Your Data Center 29 / 38
Read-Only Slaves for Analytics
Network
Data WarehouseMaster Server
/pg_xlog/pg_xlog
Making Postgres Central in Your Data Center 30 / 38
4. Foreign Data Wrappers (Database Federation)
Foreign data wrappers (SQL MED) allow queries to read and write
data to foreign data sources. Foreign database support includes:
◮ CouchDB
◮ Informix
◮ MongoDB
◮ MySQL
◮ Neo4j
◮ Oracle
◮ Postgres
◮ Redis
The transfer of joins, aggregates, and sorts to foreign servers is not yet
implemented.
http://www.postgresql.org/docs/current/static/ddl-foreign-data.html
http://wiki.postgresql.org/wiki/Foreign_data_wrappers
Making Postgres Central in Your Data Center 31 / 38
Foreign Data Wrappers to Interfaces
◮ JDBC
◮ LDAP
◮ ODBC
Making Postgres Central in Your Data Center 32 / 38
Foreign Data Wrappers to
Non-Traditional Data Sources
◮ Files
◮ HTTP
◮ AWS S3
◮ Twitter
Making Postgres Central in Your Data Center 33 / 38
Foreign Data Wrapper Example
CREATE SERVER postgres_fdw_test
FOREIGN DATA WRAPPER postgres_fdw
OPTIONS (host ’localhost’, dbname ’fdw_test’);
CREATE USER MAPPING FOR PUBLIC
SERVER postgres_fdw_test
OPTIONS (password ’’);
CREATE FOREIGN TABLE other_world (greeting TEXT)
SERVER postgres_fdw_test
OPTIONS (table_name ’world’);
det
List of foreign tables
Schema | Table | Server
--------+-------------+-------------------
public | other_world | postgres_fdw_test
(1 row)
Foreign Postgres server name in red; foreign table name in blue
Making Postgres Central in Your Data Center 34 / 38
Read and Read/Write Data Sources
Postgres
ora_tab
tw_tab
mon_tab
MongoDB
Twitter
Oracle
Making Postgres Central in Your Data Center 35 / 38
5. Postgres Centrality
Postgres can rightly take a central place in the data center with
its:
◮ Object-Relation flexibility and extensibility
◮ NoSQL-like workloads
◮ Powerful data analytics capabilities
◮ Access to foreign data sources
No other database has all of these key components.
Making Postgres Central in Your Data Center 36 / 38
Postgres’s Central Role
Extensions
NoSQL
Postgres
Warehouse
Data
Foreign Data
Wrappers
Window Functions
Data Paritioning
Bitmap Scans Sharding
Oracle
Twitter
MongoDB
Easy DDL
JSON
PL/R
ISN
PostGIS
Making Postgres Central in Your Data Center 37 / 38
Conclusion
http://momjian.us/presentations http://flickr.com/photos/vpickering/3617513255
Making Postgres Central in Your Data Center 38 / 38

More Related Content

What's hot

Large Table Partitioning with PostgreSQL and Django
 Large Table Partitioning with PostgreSQL and Django Large Table Partitioning with PostgreSQL and Django
Large Table Partitioning with PostgreSQL and DjangoEDB
 
Migration DB2 to EDB - Project Experience
 Migration DB2 to EDB - Project Experience Migration DB2 to EDB - Project Experience
Migration DB2 to EDB - Project ExperienceEDB
 
Migrating from Oracle to Postgres
Migrating from Oracle to PostgresMigrating from Oracle to Postgres
Migrating from Oracle to PostgresEDB
 
Postgres: The NoSQL Cake You Can Eat
Postgres: The NoSQL Cake You Can EatPostgres: The NoSQL Cake You Can Eat
Postgres: The NoSQL Cake You Can EatEDB
 
Application Development & Database Choices: Postgres Support for non Relation...
Application Development & Database Choices: Postgres Support for non Relation...Application Development & Database Choices: Postgres Support for non Relation...
Application Development & Database Choices: Postgres Support for non Relation...EDB
 
Postgres Point-in-Time Recovery
Postgres Point-in-Time RecoveryPostgres Point-in-Time Recovery
Postgres Point-in-Time RecoveryEDB
 
Active/Active Database Solutions with Log Based Replication in xDB 6.0
Active/Active Database Solutions with Log Based Replication in xDB 6.0Active/Active Database Solutions with Log Based Replication in xDB 6.0
Active/Active Database Solutions with Log Based Replication in xDB 6.0EDB
 
NoSQL on ACID: Meet Unstructured Postgres
NoSQL on ACID: Meet Unstructured PostgresNoSQL on ACID: Meet Unstructured Postgres
NoSQL on ACID: Meet Unstructured PostgresEDB
 
Which Postgres is Right for You?
Which Postgres is Right for You? Which Postgres is Right for You?
Which Postgres is Right for You? EDB
 
EDB Postgres Platform 11 Webinar
EDB Postgres Platform 11 WebinarEDB Postgres Platform 11 Webinar
EDB Postgres Platform 11 WebinarEDB
 
Using PEM to understand and improve performance in Postgres: Postgres Tuning ...
Using PEM to understand and improve performance in Postgres: Postgres Tuning ...Using PEM to understand and improve performance in Postgres: Postgres Tuning ...
Using PEM to understand and improve performance in Postgres: Postgres Tuning ...EDB
 
Zero-to-hero: Running Postgres in Kubernetes, Enterprise Postgres Day
Zero-to-hero: Running Postgres in Kubernetes, Enterprise Postgres DayZero-to-hero: Running Postgres in Kubernetes, Enterprise Postgres Day
Zero-to-hero: Running Postgres in Kubernetes, Enterprise Postgres DayEDB
 
Ashnik EnterpriseDB PostgreSQL - A real alternative to Oracle
Ashnik EnterpriseDB PostgreSQL - A real alternative to Oracle Ashnik EnterpriseDB PostgreSQL - A real alternative to Oracle
Ashnik EnterpriseDB PostgreSQL - A real alternative to Oracle Ashnikbiz
 
Expanding with EDB Postgres Advanced Server 9.5
Expanding with EDB Postgres Advanced Server 9.5Expanding with EDB Postgres Advanced Server 9.5
Expanding with EDB Postgres Advanced Server 9.5EDB
 
The Real Scoop on Migrating from Oracle Databases
The Real Scoop on Migrating from Oracle DatabasesThe Real Scoop on Migrating from Oracle Databases
The Real Scoop on Migrating from Oracle DatabasesEDB
 
Hello World with EDB Postgres
Hello World with EDB PostgresHello World with EDB Postgres
Hello World with EDB PostgresEDB
 
NoSQL and Spatial Database Capabilities using PostgreSQL
NoSQL and Spatial Database Capabilities using PostgreSQLNoSQL and Spatial Database Capabilities using PostgreSQL
NoSQL and Spatial Database Capabilities using PostgreSQLEDB
 
New Approaches to Migrating from Oracle to Enterprise-Ready Postgres in the C...
New Approaches to Migrating from Oracle to Enterprise-Ready Postgres in the C...New Approaches to Migrating from Oracle to Enterprise-Ready Postgres in the C...
New Approaches to Migrating from Oracle to Enterprise-Ready Postgres in the C...EDB
 
A Journey from Oracle to PostgreSQL
A Journey from Oracle to PostgreSQLA Journey from Oracle to PostgreSQL
A Journey from Oracle to PostgreSQLEDB
 
Webinar: Managing Postgres at Scale
Webinar: Managing Postgres at ScaleWebinar: Managing Postgres at Scale
Webinar: Managing Postgres at ScaleEDB
 

What's hot (20)

Large Table Partitioning with PostgreSQL and Django
 Large Table Partitioning with PostgreSQL and Django Large Table Partitioning with PostgreSQL and Django
Large Table Partitioning with PostgreSQL and Django
 
Migration DB2 to EDB - Project Experience
 Migration DB2 to EDB - Project Experience Migration DB2 to EDB - Project Experience
Migration DB2 to EDB - Project Experience
 
Migrating from Oracle to Postgres
Migrating from Oracle to PostgresMigrating from Oracle to Postgres
Migrating from Oracle to Postgres
 
Postgres: The NoSQL Cake You Can Eat
Postgres: The NoSQL Cake You Can EatPostgres: The NoSQL Cake You Can Eat
Postgres: The NoSQL Cake You Can Eat
 
Application Development & Database Choices: Postgres Support for non Relation...
Application Development & Database Choices: Postgres Support for non Relation...Application Development & Database Choices: Postgres Support for non Relation...
Application Development & Database Choices: Postgres Support for non Relation...
 
Postgres Point-in-Time Recovery
Postgres Point-in-Time RecoveryPostgres Point-in-Time Recovery
Postgres Point-in-Time Recovery
 
Active/Active Database Solutions with Log Based Replication in xDB 6.0
Active/Active Database Solutions with Log Based Replication in xDB 6.0Active/Active Database Solutions with Log Based Replication in xDB 6.0
Active/Active Database Solutions with Log Based Replication in xDB 6.0
 
NoSQL on ACID: Meet Unstructured Postgres
NoSQL on ACID: Meet Unstructured PostgresNoSQL on ACID: Meet Unstructured Postgres
NoSQL on ACID: Meet Unstructured Postgres
 
Which Postgres is Right for You?
Which Postgres is Right for You? Which Postgres is Right for You?
Which Postgres is Right for You?
 
EDB Postgres Platform 11 Webinar
EDB Postgres Platform 11 WebinarEDB Postgres Platform 11 Webinar
EDB Postgres Platform 11 Webinar
 
Using PEM to understand and improve performance in Postgres: Postgres Tuning ...
Using PEM to understand and improve performance in Postgres: Postgres Tuning ...Using PEM to understand and improve performance in Postgres: Postgres Tuning ...
Using PEM to understand and improve performance in Postgres: Postgres Tuning ...
 
Zero-to-hero: Running Postgres in Kubernetes, Enterprise Postgres Day
Zero-to-hero: Running Postgres in Kubernetes, Enterprise Postgres DayZero-to-hero: Running Postgres in Kubernetes, Enterprise Postgres Day
Zero-to-hero: Running Postgres in Kubernetes, Enterprise Postgres Day
 
Ashnik EnterpriseDB PostgreSQL - A real alternative to Oracle
Ashnik EnterpriseDB PostgreSQL - A real alternative to Oracle Ashnik EnterpriseDB PostgreSQL - A real alternative to Oracle
Ashnik EnterpriseDB PostgreSQL - A real alternative to Oracle
 
Expanding with EDB Postgres Advanced Server 9.5
Expanding with EDB Postgres Advanced Server 9.5Expanding with EDB Postgres Advanced Server 9.5
Expanding with EDB Postgres Advanced Server 9.5
 
The Real Scoop on Migrating from Oracle Databases
The Real Scoop on Migrating from Oracle DatabasesThe Real Scoop on Migrating from Oracle Databases
The Real Scoop on Migrating from Oracle Databases
 
Hello World with EDB Postgres
Hello World with EDB PostgresHello World with EDB Postgres
Hello World with EDB Postgres
 
NoSQL and Spatial Database Capabilities using PostgreSQL
NoSQL and Spatial Database Capabilities using PostgreSQLNoSQL and Spatial Database Capabilities using PostgreSQL
NoSQL and Spatial Database Capabilities using PostgreSQL
 
New Approaches to Migrating from Oracle to Enterprise-Ready Postgres in the C...
New Approaches to Migrating from Oracle to Enterprise-Ready Postgres in the C...New Approaches to Migrating from Oracle to Enterprise-Ready Postgres in the C...
New Approaches to Migrating from Oracle to Enterprise-Ready Postgres in the C...
 
A Journey from Oracle to PostgreSQL
A Journey from Oracle to PostgreSQLA Journey from Oracle to PostgreSQL
A Journey from Oracle to PostgreSQL
 
Webinar: Managing Postgres at Scale
Webinar: Managing Postgres at ScaleWebinar: Managing Postgres at Scale
Webinar: Managing Postgres at Scale
 

Similar to Making Postgres Central in Your Data Center

Postgres в основе вашего дата-центра, Bruce Momjian (EnterpriseDB)
Postgres в основе вашего дата-центра, Bruce Momjian (EnterpriseDB)Postgres в основе вашего дата-центра, Bruce Momjian (EnterpriseDB)
Postgres в основе вашего дата-центра, Bruce Momjian (EnterpriseDB)Ontico
 
Making Postgres Central in Your Data Center
Making Postgres Central in Your Data CenterMaking Postgres Central in Your Data Center
Making Postgres Central in Your Data CenterEDB
 
Making.postgres.central.2015
Making.postgres.central.2015Making.postgres.central.2015
Making.postgres.central.2015EDB
 
Informix Data Streaming Overview
Informix Data Streaming OverviewInformix Data Streaming Overview
Informix Data Streaming OverviewBrian Hughes
 
Postgresql Database Administration Basic - Day2
Postgresql  Database Administration Basic  - Day2Postgresql  Database Administration Basic  - Day2
Postgresql Database Administration Basic - Day2PoguttuezhiniVP
 
Flexible Indexing with Postgres
Flexible Indexing with PostgresFlexible Indexing with Postgres
Flexible Indexing with PostgresEDB
 
How to use Parquet as a Sasis for ETL and Analytics
How to use Parquet as a Sasis for ETL and AnalyticsHow to use Parquet as a Sasis for ETL and Analytics
How to use Parquet as a Sasis for ETL and AnalyticsDataWorks Summit
 
Jethro data meetup index base sql on hadoop - oct-2014
Jethro data meetup    index base sql on hadoop - oct-2014Jethro data meetup    index base sql on hadoop - oct-2014
Jethro data meetup index base sql on hadoop - oct-2014Eli Singer
 
Demystifying postgres logical replication percona live sc
Demystifying postgres logical replication percona live scDemystifying postgres logical replication percona live sc
Demystifying postgres logical replication percona live scEmanuel Calvo
 
PostgreSQL Performance Problems: Monitoring and Alerting
PostgreSQL Performance Problems: Monitoring and AlertingPostgreSQL Performance Problems: Monitoring and Alerting
PostgreSQL Performance Problems: Monitoring and AlertingGrant Fritchey
 
10 Reasons to Start Your Analytics Project with PostgreSQL
10 Reasons to Start Your Analytics Project with PostgreSQL10 Reasons to Start Your Analytics Project with PostgreSQL
10 Reasons to Start Your Analytics Project with PostgreSQLSatoshi Nagayasu
 
Microsoft Azure Big Data Analytics
Microsoft Azure Big Data AnalyticsMicrosoft Azure Big Data Analytics
Microsoft Azure Big Data AnalyticsMark Kromer
 
Real World Storage in Treasure Data
Real World Storage in Treasure DataReal World Storage in Treasure Data
Real World Storage in Treasure DataKai Sasaki
 
PostgreSQL Extension APIs are Changing the Face of Relational Databases | PGC...
PostgreSQL Extension APIs are Changing the Face of Relational Databases | PGC...PostgreSQL Extension APIs are Changing the Face of Relational Databases | PGC...
PostgreSQL Extension APIs are Changing the Face of Relational Databases | PGC...Teresa Giacomini
 
Flexible Indexing with Postgres
Flexible Indexing with PostgresFlexible Indexing with Postgres
Flexible Indexing with PostgresEDB
 
Unifying your data management with Hadoop
Unifying your data management with HadoopUnifying your data management with Hadoop
Unifying your data management with HadoopJayant Shekhar
 
Elk presentation 2#3
Elk presentation 2#3Elk presentation 2#3
Elk presentation 2#3uzzal basak
 
Real time analytics at uber @ strata data 2019
Real time analytics at uber @ strata data 2019Real time analytics at uber @ strata data 2019
Real time analytics at uber @ strata data 2019Zhenxiao Luo
 
Distributing Queries the Citus Way | PostgresConf US 2018 | Marco Slot
Distributing Queries the Citus Way | PostgresConf US 2018 | Marco SlotDistributing Queries the Citus Way | PostgresConf US 2018 | Marco Slot
Distributing Queries the Citus Way | PostgresConf US 2018 | Marco SlotCitus Data
 

Similar to Making Postgres Central in Your Data Center (20)

Postgres в основе вашего дата-центра, Bruce Momjian (EnterpriseDB)
Postgres в основе вашего дата-центра, Bruce Momjian (EnterpriseDB)Postgres в основе вашего дата-центра, Bruce Momjian (EnterpriseDB)
Postgres в основе вашего дата-центра, Bruce Momjian (EnterpriseDB)
 
Making Postgres Central in Your Data Center
Making Postgres Central in Your Data CenterMaking Postgres Central in Your Data Center
Making Postgres Central in Your Data Center
 
Making.postgres.central.2015
Making.postgres.central.2015Making.postgres.central.2015
Making.postgres.central.2015
 
Informix Data Streaming Overview
Informix Data Streaming OverviewInformix Data Streaming Overview
Informix Data Streaming Overview
 
Postgresql Database Administration Basic - Day2
Postgresql  Database Administration Basic  - Day2Postgresql  Database Administration Basic  - Day2
Postgresql Database Administration Basic - Day2
 
Flexible Indexing with Postgres
Flexible Indexing with PostgresFlexible Indexing with Postgres
Flexible Indexing with Postgres
 
How to use Parquet as a Sasis for ETL and Analytics
How to use Parquet as a Sasis for ETL and AnalyticsHow to use Parquet as a Sasis for ETL and Analytics
How to use Parquet as a Sasis for ETL and Analytics
 
Jethro data meetup index base sql on hadoop - oct-2014
Jethro data meetup    index base sql on hadoop - oct-2014Jethro data meetup    index base sql on hadoop - oct-2014
Jethro data meetup index base sql on hadoop - oct-2014
 
Demystifying postgres logical replication percona live sc
Demystifying postgres logical replication percona live scDemystifying postgres logical replication percona live sc
Demystifying postgres logical replication percona live sc
 
PostgreSQL Performance Problems: Monitoring and Alerting
PostgreSQL Performance Problems: Monitoring and AlertingPostgreSQL Performance Problems: Monitoring and Alerting
PostgreSQL Performance Problems: Monitoring and Alerting
 
10 Reasons to Start Your Analytics Project with PostgreSQL
10 Reasons to Start Your Analytics Project with PostgreSQL10 Reasons to Start Your Analytics Project with PostgreSQL
10 Reasons to Start Your Analytics Project with PostgreSQL
 
Microsoft Azure Big Data Analytics
Microsoft Azure Big Data AnalyticsMicrosoft Azure Big Data Analytics
Microsoft Azure Big Data Analytics
 
Real World Storage in Treasure Data
Real World Storage in Treasure DataReal World Storage in Treasure Data
Real World Storage in Treasure Data
 
PostgreSQL Extension APIs are Changing the Face of Relational Databases | PGC...
PostgreSQL Extension APIs are Changing the Face of Relational Databases | PGC...PostgreSQL Extension APIs are Changing the Face of Relational Databases | PGC...
PostgreSQL Extension APIs are Changing the Face of Relational Databases | PGC...
 
Flexible Indexing with Postgres
Flexible Indexing with PostgresFlexible Indexing with Postgres
Flexible Indexing with Postgres
 
Unifying your data management with Hadoop
Unifying your data management with HadoopUnifying your data management with Hadoop
Unifying your data management with Hadoop
 
Elk presentation 2#3
Elk presentation 2#3Elk presentation 2#3
Elk presentation 2#3
 
An Introduction to Postgresql
An Introduction to PostgresqlAn Introduction to Postgresql
An Introduction to Postgresql
 
Real time analytics at uber @ strata data 2019
Real time analytics at uber @ strata data 2019Real time analytics at uber @ strata data 2019
Real time analytics at uber @ strata data 2019
 
Distributing Queries the Citus Way | PostgresConf US 2018 | Marco Slot
Distributing Queries the Citus Way | PostgresConf US 2018 | Marco SlotDistributing Queries the Citus Way | PostgresConf US 2018 | Marco Slot
Distributing Queries the Citus Way | PostgresConf US 2018 | Marco Slot
 

More from EDB

Cloud Migration Paths: Kubernetes, IaaS, or DBaaS
Cloud Migration Paths: Kubernetes, IaaS, or DBaaSCloud Migration Paths: Kubernetes, IaaS, or DBaaS
Cloud Migration Paths: Kubernetes, IaaS, or DBaaSEDB
 
Die 10 besten PostgreSQL-Replikationsstrategien für Ihr Unternehmen
Die 10 besten PostgreSQL-Replikationsstrategien für Ihr UnternehmenDie 10 besten PostgreSQL-Replikationsstrategien für Ihr Unternehmen
Die 10 besten PostgreSQL-Replikationsstrategien für Ihr UnternehmenEDB
 
Migre sus bases de datos Oracle a la nube
Migre sus bases de datos Oracle a la nube Migre sus bases de datos Oracle a la nube
Migre sus bases de datos Oracle a la nube EDB
 
EFM Office Hours - APJ - July 29, 2021
EFM Office Hours - APJ - July 29, 2021EFM Office Hours - APJ - July 29, 2021
EFM Office Hours - APJ - July 29, 2021EDB
 
Benchmarking Cloud Native PostgreSQL
Benchmarking Cloud Native PostgreSQLBenchmarking Cloud Native PostgreSQL
Benchmarking Cloud Native PostgreSQLEDB
 
Las Variaciones de la Replicación de PostgreSQL
Las Variaciones de la Replicación de PostgreSQLLas Variaciones de la Replicación de PostgreSQL
Las Variaciones de la Replicación de PostgreSQLEDB
 
Is There Anything PgBouncer Can’t Do?
Is There Anything PgBouncer Can’t Do?Is There Anything PgBouncer Can’t Do?
Is There Anything PgBouncer Can’t Do?EDB
 
Data Analysis with TensorFlow in PostgreSQL
Data Analysis with TensorFlow in PostgreSQLData Analysis with TensorFlow in PostgreSQL
Data Analysis with TensorFlow in PostgreSQLEDB
 
Practical Partitioning in Production with Postgres
Practical Partitioning in Production with PostgresPractical Partitioning in Production with Postgres
Practical Partitioning in Production with PostgresEDB
 
A Deeper Dive into EXPLAIN
A Deeper Dive into EXPLAINA Deeper Dive into EXPLAIN
A Deeper Dive into EXPLAINEDB
 
IOT with PostgreSQL
IOT with PostgreSQLIOT with PostgreSQL
IOT with PostgreSQLEDB
 
Psql is awesome!
Psql is awesome!Psql is awesome!
Psql is awesome!EDB
 
EDB 13 - New Enhancements for Security and Usability - APJ
EDB 13 - New Enhancements for Security and Usability - APJEDB 13 - New Enhancements for Security and Usability - APJ
EDB 13 - New Enhancements for Security and Usability - APJEDB
 
Comment sauvegarder correctement vos données
Comment sauvegarder correctement vos donnéesComment sauvegarder correctement vos données
Comment sauvegarder correctement vos donnéesEDB
 
Cloud Native PostgreSQL - Italiano
Cloud Native PostgreSQL - ItalianoCloud Native PostgreSQL - Italiano
Cloud Native PostgreSQL - ItalianoEDB
 
New enhancements for security and usability in EDB 13
New enhancements for security and usability in EDB 13New enhancements for security and usability in EDB 13
New enhancements for security and usability in EDB 13EDB
 
Best Practices in Security with PostgreSQL
Best Practices in Security with PostgreSQLBest Practices in Security with PostgreSQL
Best Practices in Security with PostgreSQLEDB
 
Cloud Native PostgreSQL - APJ
Cloud Native PostgreSQL - APJCloud Native PostgreSQL - APJ
Cloud Native PostgreSQL - APJEDB
 
Best Practices in Security with PostgreSQL
Best Practices in Security with PostgreSQLBest Practices in Security with PostgreSQL
Best Practices in Security with PostgreSQLEDB
 
EDB Postgres & Tools in a Smart City Project
EDB Postgres & Tools in a Smart City ProjectEDB Postgres & Tools in a Smart City Project
EDB Postgres & Tools in a Smart City ProjectEDB
 

More from EDB (20)

Cloud Migration Paths: Kubernetes, IaaS, or DBaaS
Cloud Migration Paths: Kubernetes, IaaS, or DBaaSCloud Migration Paths: Kubernetes, IaaS, or DBaaS
Cloud Migration Paths: Kubernetes, IaaS, or DBaaS
 
Die 10 besten PostgreSQL-Replikationsstrategien für Ihr Unternehmen
Die 10 besten PostgreSQL-Replikationsstrategien für Ihr UnternehmenDie 10 besten PostgreSQL-Replikationsstrategien für Ihr Unternehmen
Die 10 besten PostgreSQL-Replikationsstrategien für Ihr Unternehmen
 
Migre sus bases de datos Oracle a la nube
Migre sus bases de datos Oracle a la nube Migre sus bases de datos Oracle a la nube
Migre sus bases de datos Oracle a la nube
 
EFM Office Hours - APJ - July 29, 2021
EFM Office Hours - APJ - July 29, 2021EFM Office Hours - APJ - July 29, 2021
EFM Office Hours - APJ - July 29, 2021
 
Benchmarking Cloud Native PostgreSQL
Benchmarking Cloud Native PostgreSQLBenchmarking Cloud Native PostgreSQL
Benchmarking Cloud Native PostgreSQL
 
Las Variaciones de la Replicación de PostgreSQL
Las Variaciones de la Replicación de PostgreSQLLas Variaciones de la Replicación de PostgreSQL
Las Variaciones de la Replicación de PostgreSQL
 
Is There Anything PgBouncer Can’t Do?
Is There Anything PgBouncer Can’t Do?Is There Anything PgBouncer Can’t Do?
Is There Anything PgBouncer Can’t Do?
 
Data Analysis with TensorFlow in PostgreSQL
Data Analysis with TensorFlow in PostgreSQLData Analysis with TensorFlow in PostgreSQL
Data Analysis with TensorFlow in PostgreSQL
 
Practical Partitioning in Production with Postgres
Practical Partitioning in Production with PostgresPractical Partitioning in Production with Postgres
Practical Partitioning in Production with Postgres
 
A Deeper Dive into EXPLAIN
A Deeper Dive into EXPLAINA Deeper Dive into EXPLAIN
A Deeper Dive into EXPLAIN
 
IOT with PostgreSQL
IOT with PostgreSQLIOT with PostgreSQL
IOT with PostgreSQL
 
Psql is awesome!
Psql is awesome!Psql is awesome!
Psql is awesome!
 
EDB 13 - New Enhancements for Security and Usability - APJ
EDB 13 - New Enhancements for Security and Usability - APJEDB 13 - New Enhancements for Security and Usability - APJ
EDB 13 - New Enhancements for Security and Usability - APJ
 
Comment sauvegarder correctement vos données
Comment sauvegarder correctement vos donnéesComment sauvegarder correctement vos données
Comment sauvegarder correctement vos données
 
Cloud Native PostgreSQL - Italiano
Cloud Native PostgreSQL - ItalianoCloud Native PostgreSQL - Italiano
Cloud Native PostgreSQL - Italiano
 
New enhancements for security and usability in EDB 13
New enhancements for security and usability in EDB 13New enhancements for security and usability in EDB 13
New enhancements for security and usability in EDB 13
 
Best Practices in Security with PostgreSQL
Best Practices in Security with PostgreSQLBest Practices in Security with PostgreSQL
Best Practices in Security with PostgreSQL
 
Cloud Native PostgreSQL - APJ
Cloud Native PostgreSQL - APJCloud Native PostgreSQL - APJ
Cloud Native PostgreSQL - APJ
 
Best Practices in Security with PostgreSQL
Best Practices in Security with PostgreSQLBest Practices in Security with PostgreSQL
Best Practices in Security with PostgreSQL
 
EDB Postgres & Tools in a Smart City Project
EDB Postgres & Tools in a Smart City ProjectEDB Postgres & Tools in a Smart City Project
EDB Postgres & Tools in a Smart City Project
 

Recently uploaded

NSX-T and Service Interfaces presentation
NSX-T and Service Interfaces presentationNSX-T and Service Interfaces presentation
NSX-T and Service Interfaces presentationMarko4394
 
Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Paul Calvano
 
Q4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptxQ4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptxeditsforyah
 
Top 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxTop 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxDyna Gilbert
 
SCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is prediSCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is predieusebiomeyer
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Sonam Pathan
 
Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhimiss dipika
 
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书rnrncn29
 
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Sonam Pathan
 
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书rnrncn29
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa494f574xmv
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作ys8omjxb
 
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一z xss
 
PHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationPHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationLinaWolf1
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书zdzoqco
 

Recently uploaded (17)

young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
 
NSX-T and Service Interfaces presentation
NSX-T and Service Interfaces presentationNSX-T and Service Interfaces presentation
NSX-T and Service Interfaces presentation
 
Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24
 
Q4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptxQ4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptx
 
Top 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxTop 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptx
 
SCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is prediSCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is predi
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170
 
Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhi
 
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
 
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
 
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa
 
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
 
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
 
PHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationPHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 Documentation
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
 

Making Postgres Central in Your Data Center

  • 1. Making Postgres Central in Your Data Center BRUCE MOMJIAN February, 2014 This talk explores why Postgres is uniquely capable of functioning as a central database in enterprises. Title concept from Josh Berkus Creative Commons Attribution License http://momjian.us/presentations 1 / 38
  • 2. Outline 1. Object-Relational (extensibility) 2. NoSQL 3. Data analytics 4. Foreign data wrappers (database federation) 5. Central role Making Postgres Central in Your Data Center 2 / 38
  • 3. 1. Object-Relational (Extensibility) Object-relational databases like Postgres support support classes and inheritance, but most importantly, they define database functionality as objects that can be easily manipulated. http://en.wikipedia.org/wiki/Object-relational_database Making Postgres Central in Your Data Center 3 / 38
  • 4. How Is this Accomplished? starelid staattnum staop pg_statistic oprleft oprright oprresult oprcom oprnegate oprlsortop oprrsortop oprcode oprrest oprjoin pg_operator typrelid typelem typinput typoutput typbasetype pg_type prolang prorettype pg_proc pg_rewrite ev_class datlastsysoid pg_database tgfoid tgrelid pg_trigger inhrelid pg_inherits inhparent pg_language pg_namespacepg_depend pg_shadow pg_aggregate aggfinalfn aggtransfn aggfnoid aggtranstype castsource casttarget pg_cast castfunc pg_description pg_constraint contypid pg_conversion conproc amopopr amopclaid pg_attribute indexrelid attnum amopclaid atttypid indrelid pg_attrdef pg_group adrelid pg_index adnum pg_am pg_amop amgettuple reltoastidxid aminsert reltoastrelid amcostestimate amproc ambeginscan pg_amproc amrescan relfilenode amendscan relam ammarkpos reltype amrestrpos pg_class ambuild opcdeftype ambulkdelete pg_opclass attrelid http://www.postgresql.org/docs/current/static/catalogs.html Making Postgres Central in Your Data Center 4 / 38
  • 5. Example: ISBN Data Type CREATE EXTENSION isn; dT List of data types Schema | Name | Description --------+--------+-------------------------------------------------- public | ean13 | International European Article Number (EAN13) public | isbn | International Standard Book Number (ISBN) public | isbn13 | International Standard Book Number 13 (ISBN13) public | ismn | International Standard Music Number (ISMN) public | ismn13 | International Standard Music Number 13 (ISMN13) public | issn | International Standard Serial Number (ISSN) public | issn13 | International Standard Serial Number 13 (ISSN13) public | upc | Universal Product Code (UPC) http://www.postgresql.org/docs/current/static/isn.html Making Postgres Central in Your Data Center 5 / 38
  • 6. ISBN Behaves Just Like Built-In Types dTS … pg_catalog | integer | -2 billion to 2 billion integer, 4-byte storage … public | isbn | International Standard Book Number (ISBN) Making Postgres Central in Your Data Center 6 / 38
  • 7. The System Catalog Entry for INTEGER SELECT * FROM pg_type WHERE typname = ’int4’; -[ RECORD 1 ]--+--------- typname | int4 typnamespace | 11 typowner | 10 typlen | 4 typbyval | t typtype | b typcategory | N typispreferred | f typisdefined | t typdelim | , typrelid | 0 typelem | 0 typarray | 1007 typinput | int4in typoutput | int4out typreceive | int4recv typsend | int4send typmodin | - typmodout | - typanalyze | - typalign | i typstorage | p typnotnull | f Making Postgres Central in Your Data Center 7 / 38
  • 8. The System Catalog Entry for ISBN SELECT * FROM pg_type WHERE typname = ’isbn’; -[ RECORD 1 ]--+--------------- typname | isbn typnamespace | 2200 typowner | 10 typlen | 8 typbyval | t typtype | b typcategory | U typispreferred | f typisdefined | t typdelim | , typrelid | 0 typelem | 0 typarray | 16405 typinput | isbn_in typoutput | public.isn_out typreceive | - typsend | - typmodin | - typmodout | - typanalyze | - typalign | d typstorage | p typnotnull | f Making Postgres Central in Your Data Center 8 / 38
  • 9. Not Just Data Types, Languages CREATE EXTENSION plpythonu; dL List of languages Name | Owner | Trusted | Description -----------+----------+---------+------------------------------------------ plpgsql | postgres | t | PL/pgSQL procedural language plpythonu | postgres | f | PL/PythonU untrusted procedural language http://www.postgresql.org/docs/current/static/plpython.html Making Postgres Central in Your Data Center 9 / 38
  • 10. Available Languages ◮ PL/Java ◮ PL/Perl ◮ PL/pgSQL (like PL/SQL) ◮ PL/PHP ◮ PL/Python. ◮ PL/R (like SPSS) ◮ PL/Ruby ◮ PL/Scheme ◮ PL/sh ◮ PL/Tcl ◮ SPI (C) http://www.postgresql.org/docs/current/static/external-pl.html Making Postgres Central in Your Data Center 10 / 38
  • 11. Specialized Indexing Methods ◮ BTree ◮ Hash ◮ GiST (generalized search tree) ◮ SP-GiST (space-partitioned GiST) ◮ GIN (generalized inverted index) http://www.postgresql.org/docs/current/static/indexam.html Making Postgres Central in Your Data Center 11 / 38
  • 12. Index Types Are Defined in the System Catalogs Too SELECT amname FROM pg_am; amname -------- btree hash gist gin spgist http://www.postgresql.org/docs/current/static/catalog-pg-am.html Making Postgres Central in Your Data Center 12 / 38
  • 13. Operators Have Similar Flexibility Operators are function calls with left and right operators of specified types: doS Schema | Name | Left arg type | Right arg type | Result type | Description … pg_catalog | + | integer | integer | integer | add dfS Schema | Name | Result data type | Argument data types | Type … pg_catalog | int4pl | integer | integer, integer | normal Making Postgres Central in Your Data Center 13 / 38
  • 14. Other Extensibility ◮ Casts are defined in pg_cast, int4(float8) ◮ Aggregates are defined in pg_aggregate, sum(int4) Making Postgres Central in Your Data Center 14 / 38
  • 15. Externally Developed Plug-Ins ◮ PostGIS (Geographical Information System) ◮ PL/v8 (server-side JavaScript) ◮ experimentation, e.g. full text search was originally externally developed Making Postgres Central in Your Data Center 15 / 38
  • 16. Offshoots of Postgres ◮ AsterDB ◮ Greenplum ◮ Informix ◮ Netezza ◮ ParAccel ◮ Postgres XC ◮ Redshift (Amazon) ◮ Truviso ◮ Vertica ◮ Yahoo! Everest https://wiki.postgresql.org/wiki/PostgreSQL_derived_databases http://de.slideshare.net/pgconf/elephant-roads-a-tour-of-postgres-forks Making Postgres Central in Your Data Center 16 / 38
  • 18. Plug-In Is Not a Bad Word Many databases treat extensions as special cases, with serious limitations. Postgres built-ins use the same API as extensions, so ll extensions operate just like built-in functionality. Making Postgres Central in Your Data Center 18 / 38
  • 19. Extensions and Built-In Facilities Behave the Same Extensions PL/R ISN PostGIS Postgres System Tables int4 btree sum() PL/pgSQL Making Postgres Central in Your Data Center 19 / 38
  • 20. 2. NoSQL SQL Making Postgres Central in Your Data Center 20 / 38
  • 21. NoSQL Types There is no single NoSQL technology. They all take different approaches and have different features and drawbacks: ◮ Key-Value stores, e.g. Redis ◮ Document databases, e.g. MongoDB (JSON) ◮ Columnar stores: Cassandra ◮ Graph databases: Neo4j Making Postgres Central in Your Data Center 21 / 38
  • 22. Why NoSQL Exists Generally, NoSQL provides fast querying, auto-sharding, and flexible schemas by avoiding: ◮ A powerful query language ◮ A sophisticated query optimizer ◮ Data normalization ◮ Joins ◮ Referential integrity ◮ Durability Making Postgres Central in Your Data Center 22 / 38
  • 23. Are These Drawbacks Worth the Cost? ◮ Difficult Reporting Data must be brought to the client for analysis, e.g. no aggregates or data analysis functions. Schema-less data requires complex client-side knowledge for processing ◮ Complex Application Design Without powerful query language and query optimizer, the client software is responsible for efficiently accessing data and for data consistency ◮ Durability Administrators are responsible for data retention Making Postgres Central in Your Data Center 23 / 38
  • 24. When Should NoSQL Be Used? ◮ Massive write scaling is required, more than a single server can provide ◮ Only simple data access pattern is required ◮ Additional resources allocation for development is acceptable ◮ Strong data retention or transactional guarantees are not required ◮ Unstructured duplicate data that greatly benefits from column compression Making Postgres Central in Your Data Center 24 / 38
  • 25. When Should Relational Storage Be Used? ◮ Easy administration ◮ Variable workloads and reporting ◮ Simplified application development ◮ Strong data retention Making Postgres Central in Your Data Center 25 / 38
  • 26. The Best of Both Worlds: Postgres Postgres has many NoSQL features without the drawbacks: ◮ Schema-less data types, with sophisticated indexing support ◮ Transactional schema changes with rapid additional and removal of columns ◮ Durability by default, but controllable per-table or per-transaction ◮ Postgres XC and PL/Proxy allow auto-sharding for write scaling Making Postgres Central in Your Data Center 26 / 38
  • 27. Schema-Less Data: JSON CREATE TABLE customer (id SERIAL, data JSON); INSERT INTO customer VALUES (DEFAULT, ’{"name" : "Bill", "age" : 21}’); SELECT data->’name’ FROM customer WHERE (data->’age’)::text = ’21’; ?column? ---------- "Bill" Making Postgres Central in Your Data Center 27 / 38
  • 28. Easy Relational Schema Changes ALTER TABLE customer ADD COLUMN status CHAR(1); BEGIN WORK; ALTER TABLE customer ADD COLUMN debt_limit NUMERIC(10,2); ALTER TABLE customer ADD COLUMN creation_date TIMESTAMP WITH TIME ZONE; ALTER TABLE customer RENAME TO cust; COMMIT; Making Postgres Central in Your Data Center 28 / 38
  • 29. 3. Data Analytics ◮ Aggregates ◮ Optimizer ◮ Server-side languages, e.g. PL/R ◮ Window functions ◮ Bitmap heap scans ◮ Tablespaces ◮ Data partitioning ◮ Materialized views ◮ Common (recursive) table expressions ◮ Min/Max indexes (coming in 2015) Data warehouse-specific solutions are required for parallel operations across servers. http://www.slideshare.net/PGExperts/really-big-elephants-postgresql-dw-15833438 http://wiki.postgresql.org/images/3/38/PGDay2009-EN-Datawarehousing_with_PostgreSQL.pdf Making Postgres Central in Your Data Center 29 / 38
  • 30. Read-Only Slaves for Analytics Network Data WarehouseMaster Server /pg_xlog/pg_xlog Making Postgres Central in Your Data Center 30 / 38
  • 31. 4. Foreign Data Wrappers (Database Federation) Foreign data wrappers (SQL MED) allow queries to read and write data to foreign data sources. Foreign database support includes: ◮ CouchDB ◮ Informix ◮ MongoDB ◮ MySQL ◮ Neo4j ◮ Oracle ◮ Postgres ◮ Redis The transfer of joins, aggregates, and sorts to foreign servers is not yet implemented. http://www.postgresql.org/docs/current/static/ddl-foreign-data.html http://wiki.postgresql.org/wiki/Foreign_data_wrappers Making Postgres Central in Your Data Center 31 / 38
  • 32. Foreign Data Wrappers to Interfaces ◮ JDBC ◮ LDAP ◮ ODBC Making Postgres Central in Your Data Center 32 / 38
  • 33. Foreign Data Wrappers to Non-Traditional Data Sources ◮ Files ◮ HTTP ◮ AWS S3 ◮ Twitter Making Postgres Central in Your Data Center 33 / 38
  • 34. Foreign Data Wrapper Example CREATE SERVER postgres_fdw_test FOREIGN DATA WRAPPER postgres_fdw OPTIONS (host ’localhost’, dbname ’fdw_test’); CREATE USER MAPPING FOR PUBLIC SERVER postgres_fdw_test OPTIONS (password ’’); CREATE FOREIGN TABLE other_world (greeting TEXT) SERVER postgres_fdw_test OPTIONS (table_name ’world’); det List of foreign tables Schema | Table | Server --------+-------------+------------------- public | other_world | postgres_fdw_test (1 row) Foreign Postgres server name in red; foreign table name in blue Making Postgres Central in Your Data Center 34 / 38
  • 35. Read and Read/Write Data Sources Postgres ora_tab tw_tab mon_tab MongoDB Twitter Oracle Making Postgres Central in Your Data Center 35 / 38
  • 36. 5. Postgres Centrality Postgres can rightly take a central place in the data center with its: ◮ Object-Relation flexibility and extensibility ◮ NoSQL-like workloads ◮ Powerful data analytics capabilities ◮ Access to foreign data sources No other database has all of these key components. Making Postgres Central in Your Data Center 36 / 38
  • 37. Postgres’s Central Role Extensions NoSQL Postgres Warehouse Data Foreign Data Wrappers Window Functions Data Paritioning Bitmap Scans Sharding Oracle Twitter MongoDB Easy DDL JSON PL/R ISN PostGIS Making Postgres Central in Your Data Center 37 / 38