Postgres BDR PDF
Postgres BDR PDF
Nikhil Sontakke
pglogical
PostgreSQL to PostgreSQL replication
Pglogical
Releases and Plans
● Pglogical 3
○ Future architecture for PostgreSQL 12+
○ Many new features
Pglogical 3
Postgres-BDR3
Future of multi-master database for PostgreSQL
Postgres-BDR
Trusted multi-master database for PostgreSQL
● Postgres-BDR 3
○ Future architecture
● Postgres-BDR 2
○ Upgrade path to BDR3 due 3Q2019
○ De-supported by mid 2020
● Postgres-BDR 1
○ Upgrade path to BDR3 due 1Q2019
○ De-supported by end 2019
Postgres-BDR3
Future of multi-master database for PostgreSQL
Using Postgres-BDR
Transparent multi-master database for PostgreSQL
Writing to Postgres-BDR
Distributed database options
● Post-Commit Synchronization
Resolve issues after COMMIT
○ Conflict-Free Custom Datatypes (CRDTs)
○ Row-level Conflict Handling by default
○ Column-level Conflict Handling option
○ Logging and resolution of issues
○ Conflict Triggers
Writing to Postgres-BDR
Distributed database options
● Pre-Commit Synchronization
Eager Replication avoids conflicts
○ All Nodes
● Node Roles
○ Send/Receive Node (default)
○ Receive-Only Node
● Rep Sets (node subsets)
● Rolling Cross-Version Upgrades
○ One-by-one upgrades with zero downtime
○ Minimal APIs designed to allow upgrades
○ Across BDR releases and Postgres major releases
○ Fully tested to ensure compatibility
BDR Security
Cloud and High Security use cases
● BDR changes are applied as the table-owning user
● BDR functions do not need to be executed as
superuser, except for installation
● Default roles allow principle of least privilege
● Secure access to BDR catalog tables
for non-admin users
BDR Operations
Practical experience
● Clearly identify node state, even when disconnected
● Monitor current lag time and lag bytes, even for down nodes
● Options for controlling down-node effects
● Error handling and controls
BDR Performance
Real-World Production Performance
● Timestamp-based snapshots
● Allow consistent queries across nodes
even with real-time replication of data
● Data verification between nodes
Postgres-BDR3 Summary
Major new functionality, born out of production
experience
● Cluster Management
● Security
● Robustness and Supportability
● Application Maintenance
● Operations
● Performance
2ndQuadrant
PostgreSQL Solutions
Website https://www.2ndquadrant.com/
Blog https://blog.2ndquadrant.com/
Email [email protected]