Upon installation of pgBouncer, we should be able to see a default pgBouncer configuration file in the /etc/pgbouncer directory (/etc/pgbouncer/pgbouncer.ini).
This default file would not serve the purpose in a real scenario. In this recipe, we shall discuss the parameters that need to be appropriately set to have a successful pgBouncer setup.
Getting ready...
In order to proceed further with the steps in this recipe, we must have already installed pgBouncer in the first recipe Installing pgBouncer on a Linux server.
How to do it...
The following are the list of parameters that need to be appropriately configured in the configuration file /etc/pgbouncer/pgbouncer.ini:
- Under the [databases] section, add a database name and the corresponding libpq style connection string in a key-value pair format, as seen in the following example. The name specified in the key is considered as a database alias name that redirects a connection to the appropriate...