Getting ready

We need to know how to connect to PgBouncer instead of PostgreSQL, so check the Connect to PgBouncer recipe for a refresher. In this section, we will use something known as a pseudo-database. When in use, PgBouncer reserves the database name pgbouncer for its own internal purposes to access its administration console. This database does not actually exist, but it will still connect from the perspective of our PostgreSQL client.

In the highly unlikely event that the pgbouncer database actually exists within your PostgreSQL installation, we recommend renaming it to avoid confusion.

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.