How to do it...

Follow these quick steps to install Pacemaker and Corosync on all PostgreSQL server pairs running a Debian-based distribution:

  1. Install the main packages and all dependencies with this command as a root-capable user:
        sudo apt-get install corosync pacemaker
  1. Disable the cluster software from starting on system boot:
        sudo update-rc.d corosync disable
        sudo update-rc.d pacemaker disable

For those running a Red-Hat-based operating system, follow these steps to install and prepare Pacemaker:

  1. Install the main packages and all dependencies with this command as a root-capable user:
        sudo yum install corosync pacemaker
  1. Disable the cluster software from starting on system boot:
        sudo chkconfig corosync off
        sudo chkconfig pacemaker ...

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.