BDR is the first (and currently the only) multi-master solution for PostgreSQL. Once installed on two or more nodes, it allows database writes to occur on any node, and the changes will then be copied to the remainder of the cluster. This allows for immediate writes in any node within a distributed PostgreSQL cluster without any need for a failover.
BDR has existed as an open-source product since the introduction of logical replication in PostgreSQL 9.4, but required a specially patched version to operate. A later proprietary version worked as an extension to community PostgreSQL 9.6. At the time of writing, both of these implementations have been deprecated in favor of a new approach that we'll describe in the recipe itself.
This recipe will show you how to obtain and install BDR, including the necessary steps to integrate it into PostgreSQL...