Configuring pgBouncer v8.0
You must configure pgBouncer to work with the PEM database server. In our example, we will run pgBouncer as the enterprisedb system user. The following steps outline the process of configuring pgBouncer (version >= 1.9).
Open a terminal window and navigate into the pgBouncer directory.
Change the owner of the etc directory for pgBouncer (where pgbouncer.ini resides) to enterprisedb, and change the directory permissions to 0700. For example:
Change the contents of the pgbouncer.ini or edb-pgbouncer.ini file as follows:
Use the following command to create and update the /etc/edb/pgbouncer1.9/userlist.txt authentication file for pgBouncer:
NOTE: A super user cannot invoke the PEM authentication query function pem.get_proxy_auth(text). If the pem_admin user is a super user, you must add the password to the authentication file, which is enterprisedb in the above example.
Create an HBA file (/etc/edb/pgbouncer1.9/hba_file) for pgBouncer that contains the following content:
Change the owner of the HBA file (/etc/edb/pgbouncer1.9/hba_file) to enterprisedb, and change the directory permissions to 0600. For example:
Enable the pgBouncer service, and start the service. For example: