BDR User Guide
From PostgreSQL wiki
This page is the users and administrators guide for BDR. If you're looking for technical details on the project plan and implementation, see BDR Project. For detailed parameters, etc, see BDR Reference.
Just want to dive in and try out BDR? Take a look at the BDR Quick Start.
BDR (Bi-Directional Replication) is a feature being progressively added to PostgreSQL core that provides greatly enhanced replication capabilities. It is available for immediate end-user deployment as a small patch on top of PostgreSQL 9.4 plus an extension module.
BDR allows users to create a geographically distributed asynchronous multi-master database using Logical Log Streaming Replication (LLSR) transport based on the logical changeset extraction feature introduced in PostgreSQL 9.4. It is designed to provide both high availability and geographically distributed disaster recovery capabilities.
BDR is not “clustering” as some vendors use the term, in that it doesn't have a distributed lock manager, global transaction co-ordinator, etc. Each member server is separate yet connected, with design choices that allow separation between nodes that would not be possible with global transaction coordination. Each node has a local copy of the data on all the other nodes and queries run locally on individual nodes. Each node is internally consistent at all times; the group of servers as a whole is eventually-consistent.
BDR is different from all existing PostgreSQL replication solutions - it shares characteristics with, but is different from, both built-in "physical" replication and the various third party trigger-based solutions. Like trigger-based solutions and unlike streaming physical replication it replicates logical rows not disk blocks / file pages. Unlike trigger-based solutions it relies on the write-ahead log PostgreSQL already produces to provide the sequence of changes to replicate, so it isn't subject to write multiplication effects.
BDR operates per-database, not per-cluster (PostgreSQL instance). You can replicate just one database from a server. This is another significant difference from physical streaming replication.
BDR Quick Start
There is a quick-start guide available in case you just want to dive into playing with BDR. The steps described there aren't suitable for a production install, but they'll be sufficient to get you up and running if you want to experiment with BDR.
Detailed administration information is in the BDR Admin Guide, which is your main resource for BDR operations.
There are a number of reference sections on BDR parameters, commands, etc: see BDR Reference.