Installation Instructions for BDR
BDR is available as RPMs via yum for Fedora, CentOS, & RHEL, and as DEBs via apt for Debian and Ubuntu, or as source code .
YUM Repository for BDR
The instructions below are valid for Red Hat family of operating systems (RHEL, CentOS, Fedora). Repository URL is:.
These RPMs all require the PGDG PostgreSQL releases from If you don't have PostgreSQL already, install the appropriate PGDG repo rpm from. You cannot use them with stock PostgreSQL releases included in Fedora and RHEL.
You may be prompted to accept the repository GPG key for package signing. If so, accept the key by pressing 'y' then enter. (It's signed by the 2ndQuadrant master packaging key, if you want to verify that.)
Next step is to install BDR. In order to do that, you should first install the repository RPM for your distro.
- Fedora 23 and 24
yum install http://packages.2ndquadrant.com/postgresql-bdr94-2ndquadrant/yum-repo-rpms/postgresql-bdr94-2ndquadrant-fedora-latest.noarch.rpm
- RHEL/CentOS 6 and 7
yum install http://packages.2ndquadrant.com/postgresql-bdr94-2ndquadrant/yum-repo-rpms/postgresql-bdr94-2ndquadrant-redhat-latest.noarch.rpm
Once the repository is installed, you can proceed to BDR.
Remove The postgresql94 Packages
(If you don't already have PostgreSQL 9.4 installed, simply skip this step)
BDR requires a patched version of PostgreSQL 9.4 that conflicts with the official packages from yum.postgresql.org. If you already have PostgreSQL 9.4installed from yum.postgresql.org, you will need to make a dump of all your databases, then uninstall the PGDG PostgreSQL 9.4 packages before you can install BDR
The BDR RPMs cannot co-exist with stock PostgreSQL 9.4, and BDR does not share the same data directory as stock 9.4, so it will not be able to read your existing databases. (They will not be deleted, and uninstalling BDR then reinstalling stock PGDG 9.4 will get you access to them again, but it is strongly recommended that you dump them before installing BDR).
Once you have fully backed up all your databases:
yum remove postgresql94\*
Check the list of packages to be removed carefully, approve the removal if appropriate, and proceed with the removal.
Your data directory for PostgreSQL 9.4 will still exist in /var/lib/pgsql/9.4 but will not be used while BDR is installed.
Install the BDR packages
To install the BDR-enabled PostgreSQL server, BDR extension, and the client programs, simply:
sudo yum check-update sudo yum install postgresql-bdr94-bdr
APT Repository for BDR
The instructions below are valid for Debian and all Linux flavors based on Debian (e.g. Ubuntu).
In order to use 2ndQuadrant's repository, first perform the following steps:
- Create file /etc/apt/sources.list.d/2ndquadrant.list. The distributions are called codename-2ndquadrant.
- In the command below, replace "wheezy" with the actual distribution you are using. (You may determine the codename of your distribution by running lsb_release -c.)
deb [arch=amd64] http://packages.2ndquadrant.com/bdr/apt/ wheezy-2ndquadrant main
- Add the repository. See the site for instructions.
- Import the 2ndQuadrant apt repository key, update the package lists, and start installing packages
wget --quiet -O - http://packages.2ndquadrant.com/bdr/apt/AA7A6805.asc | sudo apt-key add -
sudo apt-get update
Once pre-requisites are complete, installing BDR is simply a matter of executing the following:
sudo apt-get install postgresql-bdr-9.4-bdr-plugin