Configuring PgBouncer v8
You must configure PgBouncer to work with the PEM database server. This example runs PgBouncer as the enterprisedb system user and outlines the process of configuring pgBouncer version 1.9 or later.
Open a terminal window and navigate to the pgBouncer directory.
Change the owner of the
etc
directory for pgBouncer (wherepgbouncer.ini
resides) toenterprisedb
, and change the directory permissions to0700
:Change the contents of the
pgbouncer.ini
oredb-pgbouncer.ini
file:Create and update the
/etc/edb/pgbouncer1.9/userlist.txt
authentication file for PgBouncer:Note
A superuser can't invoke the PEM authentication query function
pem.get_proxy_auth(text)
. If the pem_admin user is a superuser, you must add the password to the authentication file (enterprisedb
in the 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)
toenterprisedb
, and change the directory permissions to0600
:Enable the PgBouncer service, and start the service: