BDR (Bi-Directional Replication) v3.7

BDR (short for Bi-Directional Replication) is a PostgreSQL extension which provides a solution for building multi-master clusters with mesh topology. This means that you can write to any server and the changes will be sent row-by-row to all the other servers that are part of the same BDR group.

BDR 3 ("BDR3") is built on the pglogical 3.7 extension. However, everything you need to know about BDR3 is included here and it is unnecessary, as well as potentially confusing, to refer to pglogical 3.7 docs.

This documentation refers only to BDR3, not to earlier architectures, referred to as BDR1 and BDR2. There are significant and important differences in BDR3 and you should not refer to earlier docs or rely on anything stated within them.

BDR3 supports different versions and distributions of Postgres. See the Compatibililty matrix for more information.

Postgres-specific features

Some features are only available on particular versions of Postgres server.

  • Conflict-free Replicated Data Types - additional data types which provide mathematically proven consistency in asynchronous multi-master update scenarios (EDB Postgres Advanced, EDB Postgres Extended)
  • Column Level Conflict Resolution - ability to use per column last-update wins resolution so that UPDATEs on different fields can be "merged" without losing either of them (EDB Postgres Advanced, EDB Postgres Extended)
  • Transform Triggers - triggers that are executed on the incoming stream of data providing ability to modify it or to do advanced programmatic filtering (EDB Postgres Advanced, EDB Postgres Extended)
  • Conflict triggers - triggers which are called when conflict is detected, providing a way to use custom conflict resolution techniques (EDB Postgres Advanced, EDB Postgres Extended)
  • Additional DDL support (CREATE TABLE AS) (EDB Postgres Advanced, EDB Postgres Extended)
  • Advanced DDL Handling for NOT VALID constraints and ALTER TABLE (EDB Postgres Advanced, EDB Postgres Extended)
  • Additional synchronization for Logical/Physical Standby servers for faster build of failoverable standbys (EDB Postgres Advanced, EDB Postgres Extended)
  • Parallel Apply - allow multiple writers to apply the incoming changes (EDB Postgres Advanced, EDB Postgres Extended)
  • Eager Replication - synchronizes between the nodes of the cluster before committing a transaction to provide conflict free replication (EDB Postgres Extended)
  • Commit At Most Once - a consistency feature helping an application to commit each transaction only once, even in the presence of node failures (EDB Postgres Extended)
  • Timestamp-based Snapshots - providing consistent reads across multiple nodes for retrieving data as they appeared or will appear at a given time (EDB Postgres Extended)
  • Estimates for Replication Catch-up times (EDB Postgres Extended)
  • Hold back freezing to assist resolution of UPDATE/DELETE conflicts (EDB Postgres Extended)
  • Decoding Worker (EDB Postgres Extended 13 and above)

Features that are currently available only with EDB Postgres Extended are expected to be available with EDB Postgres Advanced 14.