Managing PgBouncer
Manage your database connections with PgBouncer, the most popular PostgreSQL Connection Pooler built-in to your ScaleGrid database management platform for PostgreSQL hosting. PgBouncer is a middleware that sits between the database and clients and creates a pool that clients can connect to. We allow you to enable PgBouncer in the cluster creation process, and customize your settings to meet the needs of your deployment.
The ScaleGrid platform handles all of the necessary PgBouncer maintenance, backend configurations, upgrades and security patches to keep the connection pooler optimized for your deployment.
Enable PgBouncer
This is only for clusters that did not enable PgBouncer in the cluster creation process.
- Log into the ScaleGrid console.
- Go to your PostgreSQL cluster details page.
- Under the Overview tab, select PgBouncer, then Enable PgBouncer from the dropdown menu.
- Set your Pooling Mode and Pool Size per your application needs.
- Click Enable to enable PgBouncer for your deployment.
Manage Your PgBouncer Settings
- Log into the ScaleGrid console.
- Go to your PostgreSQL cluster details page.
- Under the Overview tab, select PgBouncer, then Change Settings from the dropdown menu.
- Update any of the below PgBouncer settings, and click the green Update button to save.
- Pooling Mode: This determines how soon connections return to the pool. Please be aware some Postgres features are not supported in Transaction and Statement modes.
- Pool Size: This determines the maximum number of cached connections per pool (i.e. per user + database combination).
- Max Client Connection: Maximum number of client connections (across all pools) that pgBouncer will allow. This can be higher than the max_connections set on PostgreSQL server.
- Max Database Connection: Maximum number of connections to a single database that pgBouncer will allow (across pools).
- Max User Connection: Maximum number of connections by a single user that pgBouncer will allow (across pools).
Disable PgBouncer
Disabling PgBouncer will remove all your current PgBouncer configurations and change the connection string. All existing connections will be dropped and clients will have to reconnect using the new connection string.
- Log into the ScaleGrid console.
- Go to your PostgreSQL cluster details page.
- Under the Overview tab, select PgBouncer, then Disable PgBouncer from the dropdown menu.
- Click the Green Disable button to disable PgBouncer for your deployment.
Updated over 2 years ago