How to do it...

Assuming PgBouncer and pgpool are installed on the same node as the primary server at 192.168.56.10, we can combine PgBouncer and pgpool with one change. Follow these steps:

  1. Open the /etc/pgbouncer/pgbouncer.ini configuration file, and add the following line under the [databases] section:
        * = host=192.168.56.10 port=9999 
  1. Then, reload PgBouncer with the following command:
        sudo service pgbouncer 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.