How to do it...

For these instructions, 192.168.56.10 is the master PostgreSQL node, and 192.168.56.30 is the subscriber. Follow these instructions to install Bucardo:

  1. Extract the source code and change to the resulting directory with these commands:
        tar -xzf Bucardo-5.4.1.tar.gz
        cd Bucardo-5.4.1
  1. Build and install Bucardo with these commands as a root-capable user:
        Perl Makefile.PL
        make
        sudo make install
  1. Enter the following line in the .pgpass file for the postgres user:
        *:*:*:bucardo:passwordhere 
  1. Ensure that the following line exists within the pg_hba.conf file:
        host   all   bucardo   192.168.56.1/24   md5 
  1. Reload the PostgreSQL service on both nodes with the following command as the postgres user:
        pg_ctl -D /db/pgdata reload

Get PostgreSQL High Availability Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.