pgbouncer icon indicating copy to clipboard operation
pgbouncer copied to clipboard

Feature request: Per-user configuration of pool size

Open stevenwinfield opened this issue 8 years ago • 3 comments

Hi,

We use pgbouncer in our production systems and on the whole we've been extremely pleased with it, though one feature we feel is missing is the ability to configure pool_size and reserve_pool_size on a per-user (or per-database/per-user) basis.

As many others have commented in similar feature requests, we have a small number of users (some automated) who need to use a lot of connections, and that is normal behaviour, but at the same time we would like to limit the pool size for other users.

Currently our options are to set the maximum number of connections for each user database-side, but then we lose pgbouncer's reserve pool behaviour, or set up more pgbouncer instances pointing at the same databases but with different pool sizes, but then the proper allocation of resources between these instances and managing their co-operation becomes cumbersome.

I imagine being able to add something like the following to the config file: [users] username = default_pool_size=N reserve_pool_size=M ... ...which would override the per-database settings, or allow new sections to be added to the config file: [databasename/users] username = pool_size=N reserve_pool_size=M ... ...to specify the pool sizes for in database .

Is this possible?

Best regards, Steven.

stevenwinfield avatar Dec 07 '16 11:12 stevenwinfield