Chapter 2. Quick-start guide

Table of Contents
2.1. Installing the patched PostgreSQL binaries
2.2. Creating BDR-enabled PostgreSQL nodes/instances
2.3. Editing the configuration files to enable BDR
2.4. Starting the BDR-enabled PostgreSQL nodes/instances
2.5. Creating the demo databases
2.6. Enabling BDR in SQL sessions for both of your nodes/instances
2.7. Testing your BDR-enabled system

This section gives a quick introduction to BDR, including setting up a sample BDR installation and a few simple examples to try.

These instructions are not suitable for a production install, as they neglect security considerations, proper system administration procedure, etc. The instructions also assume everything is all on one host so all the pg_hba.conf examples etc show localhost. If you're trying to set up a production BDR install, read the rest of the BDR manual, starting with Installation and Node management functions.

Note: BDR uses libpq connection strings throughout. The term "DSN" (for "data source name") refers to a libpq connection string.

For this Quick Start example, we are setting up a two node cluster with two PostgreSQL instances on the same server. We are using the terms node and instance interchangeably because there's one node per PostgreSQL instance in this case, and in most typical BDR setups.

To try out BDR you'll need to install the BDR extension and the modified PostgreSQL release that it requires to run. Then it's necessary to initdb new database install(s), edit their configuration files to load BDR, and start them up.