BDR (Bi-Directional Replication) v3.7
BDR (Bi-Directional Replication) is a ground-breaking multi-master replication capability for PostgreSQL clusters that has been in full production status since 2014. In the complex environment of replication, this 3rd generation of BDR achieves efficiency and accuracy, enabling very high availability of all nodes in a geographically distributed cluster. This solution is for top-tier enterprise applications that require near-zero downtime and near-zero data loss.
As a standard PostgreSQL extension BDR does this through logical replication of data and schema along with a robust set of features and tooling to manage conflicts and monitor performance. This means applications with the most stringent demands can be run with confidence on PostgreSQL.
BDR was built from the start to allow for rolling upgrades and developed in conjunction with partners who were replacing costly legacy solutions.
Two editions are available. BDR Standard provides essential multi-master replication capabilities for delivering row level consistency to address high availability and/or geographically distributed workloads. BDR Enterprise adds advanced conflict-handling and data-loss protection capabilities.
To provide very high availability, avoid data conflicts, and to cope with more advanced usage scenarios, the Enterprise edition includes the following additional features not found in BDR Standard:
- Eager replication provides conflict free replication by synchronizing across cluster nodes before committing a transaction *
- Commit at most once consistency guards application transactions even in the presence of node failures *
- Parallel apply allows multiple writer processes to apply transactions on the downstream node improving throughput up to 2X
- Single decoding worker improves performance on upstream node by doing logical decoding of WAL once instead of for each downstream node *
- Conflict-free replicated data types (CRDTs) provide mathematically proven consistency in asynchronous multi-master update scenarios
- Column level conflict resolution enables per column last-update wins resolution to merge updates
- Transform triggers execute on incoming data for modifying or advanced programmatic filtering
- Conflict triggers provide custom resolution techniques when a conflict is detected
- Tooling to assess applications for distributed database suitability *
* Indicates feature is only available with EDB Postgres Extended at this time, and is expected to be available with EDB Postgres Advanced 14.
BDR Enterprise requires EDB Postgres Extended 11, 12, 13 (formerly known as 2ndQuadrant Postgres) which is SQL compatible with PostgreSQL. For applications requiring Oracle compatibility, BDR Enterprise requires EDB Postgres Advanced 11, 12, 13.
The Standard edition provides loosely-coupled multi-master logical replication using a mesh topology. This means that you can write to any node and the changes will be sent directly, row-by-row to all the other nodes that are part of the BDR cluster.
By default BDR uses asynchronous replication to provide row-level eventual consistency, applying changes on the peer nodes only after the local commit.
The following are included to support very high availability and geographically distributed workloads:
- Rolling application and database upgrades to address the largest source of downtime
- Origin based conflict detection and row-level last-update wins conflict resolution
- DDL replication with granular locking supports changes to application schema, ideal for use in continuous release environments
- Sub-groups with subscribe-only nodes enable data distribution use cases for applications with very high read scaling requirements
- Sequence handling provides applications different options for generating unique surrogate ids that are multi-node aware
- Tools to monitor operation and verify data consistency
BDR Standard requires PostgreSQL 11, 12, 13 or EDB Postgres Advanced 11, 12, 13 for applications requiring Oracle compatibility.