Getting ready

In order to properly demonstrate pgpool's master/slave mode, we suggest installing PostgreSQL on two servers or virtual machines as a test. Then, configure one as the primary and the second as a streaming replica. Chapter 6, Replication, specifically details how to create and maintain PostgreSQL replicas.

Then, install pgpool on the primary server according to the Installing pgpool recipe. We also need the calculated pool size from the Determining connection costs and limits recipe, so keep it handy.

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.