How to do it...

For this recipe, we will need at least three PostgreSQL servers. For demonstration purposes, we'll assume they are named pg1, pg2, and pg3. Follow these steps on all three servers:

  1. Debian-based systems should use this apt-get command to install as many distribution-provided packages as possible:
        sudo apt-get install python-psycopg2 python-pip python-yaml
  1. Red-Hat-based systems will need to substitute this yum command instead:
        sudo yum install python-psycopg2 python-pip PyYAML

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.