The elephant called PostgreSQL Ashutosh Bapat @Open Sour ce Conf er ence November 24, 2012
Agenda PostgreSQL Community Ecosystem Backup Replication Data management tools Migration Scaling out
What is PostgreSQL PostgreSQL is an Advanced Freely available Open Source Object-Relational Database Management Server (RDBMS) Supports much of SQL Developed and managed by community PostgreSQL license: BSD style license Use the way you want!
History and timeline Started in 1977 at UC@Berkeley 1977 1985 Ingres 1986 1994 Postgres: Object orientation and Quel 1994 1995 Postgres95: Support SQL 1996 PostgreSQL Managed by PostgreSQL Global Development Team
Community 6 core team members (2 employed by EnterpriseDB) 16 committers for v9.0 (4 employed by EnterpriseDB) 275 contributors for v9.0 (7 employed by EnterpriseDB) 9,000,000+ downloads / year Thousands of active deployments worldwide in public and private sector organizations of all sizes The releases are managed by the community Not by a company
Advanced features Fully ACID Compliant, Nested Transactions MVCC Point in Time Recovery (PITR) ANSI Constraints, foreign keys Triggers & Stored Functions Views & Data Types Online Backup Online Reorganization Table inheritance Database events: interprocess communication
Highly customizable User defi ned procedural languages PL/java, PL/perl, PL/SQL etc. User defi ned types with operators Spatial data types like point, line etc. User defi ned functions May be written in C, loaded from shared libraries User defi ned foreign data wrappers Methods to access data from external sources
Features in 9.2 (latest release) Read-write scalability improvements for high connection load running on high core hardware Partly funded by EnterpriseDB Index only scans Partly funded by EnterpriseDB Support for JSON datatype with PL/v8 Procedural language and datatype made for each other K-nearest neighbours (Knn) indexing SP_Gist Based on space partitioned trees Range types Many monitoring, administration and tuning features
Looking forward to 9.3 Support for LATERAL subqueries Materialized views (under development) Funded by EnterpriseDB Logical replication As against the physical replication using WAL Row level security Row level access by users Foreign Data Wrappers Method to access data from external data sources Extensible, you can defi ned your own
Tools Database connectors Java (JDBC), ODBC, Perl, Python, Ruby, C, C++, PHP, Lisp, Scheme, and Qt Server administration tools PgAdmin III Open source Postgres Enterprise Manager by EnterpriseDB Replication In-build streaming replication xdb replication trigger based cross-database replication Slony trigger based replication PgPool more on this later High Availability In-build hot/warm/cold standby Third party HA solutions like pacemaker, Red Hat Cluster etc. Cotrib modules (EXTENSIONs) Exploit the PostgreSQL customizability
Who uses PostgreSQL In India? NIC CDAC Inmobi Future Group TCS Infosys CGG List continues...
Beyond a single PostgreSQL server Performance improvement Read scalability Write scalability Read + write scalability High availability Using standby With read-scalability Geographically distributed
Hot standby + streaming replication In-built in PostgreSQL 9.0 and later Read scalable Single master writes Reads can happen on slave Read + write Application Read Streaming replication Master Standby
Trigger based replication XDB with MMR from EnterpriseDB Servers can be distributed geographically Multi-master replication Read scalability Write scalability to an extent Application Application R+W R+W R+W R+W Trigger based replication Master Master
PgPool II Statement based replication Read scalability Write scalability to an extent Automatic load balancing Parallel execution of queries Query caching and connection pooling Application PgPool (connection daemon) Master Master Master
Postgres-XC Shared nothing architecture Read + Write scalability Almost linear scalability Third party HA solution required Separate open source project through cooperation of NTT and EnterpriseDB. Application Postgres-XC cluster Coordinators GTM Transaction info Add coordinators SQL + libpq interface Datanodes Add datanodes
Thank you ashutosh.bapat@enterprisedb.com