To enable pgBouncer, you need to set the pgbouncer.enabled
parameter to “enable” in the Server Parameters section of the Flexible Server service on the Azure Portal. Currently, pgBouncer is not supported on the Burstable compute tier, so if you are using the Burstable tier, you will only see the metrics.pgbouncer_diagnostics
option when searching for pgBouncer under Server Parameters.
Note: The Flexible Server will restart during scaling operations.
All parameters related to pgBouncer will not be visible until it is enabled. Therefore, after enabling it, you need to search for pgBouncer again under Server Parameters to view the additional configuration options.
Before activation:

After activation:

You can now customize the configurations related to pgBouncer.
Using pgBouncer on Applications/Client
For pgBouncer usage, port 6432
must be used instead of 5432
. Therefore, update the port in your connection strings from 5432
to 6432
.