Add user specific reserve pool size#1228
Conversation
JelteF
left a comment
There was a problem hiding this comment.
Change looks good. But lets change the option its name to reserve_pool_size. I realize that the database section uses reserve_pool, but that name seems just wrong. Would be good to change that in a backwards compatible way in another PR.
| Set the maximum size of pools for all connections from this user. If not set, | ||
| the database or `default_pool_size` is used. | ||
|
|
||
| ### reserve_pool |
There was a problem hiding this comment.
Let's stay consistent with the naming of this option and call this reserve_pool_size throughout the PR.
| ### reserve_pool | |
| ### reserve_pool_size |
|
Thanks for the review. That's a good point about the naming. I'll submit a PR after this one for the database configuration. |
Based on discussion here: #1228 Updating the database parameter name from `reserve_pool` to `reserve_pool_size` to be consistent with everything else.
|
Needs a merge conflict resolution, other than that this looks good to merge |
Head branch was pushed to by a user without write access
|
Sorry @JelteF I had to push again because I messed up the conflict resolution and it cancelled your automerge. |
| # respoolsize1 user has a pool_size of 1 and reserve_pool_size of 2 | ||
| # this means 1 connection should happen immediately while 2 out of | ||
| # the 3 remaining connections happen after reserve_pool_timeout | ||
| result = bouncer.asleep(10, dbname="p0a", user="respoolsize1", times=4) |
There was a problem hiding this comment.
Why is this one using p0a and the other ones p0?
There was a problem hiding this comment.
p0 has the bouncer user configured to it while p0a does not have any user. From my testing it seems like no matter who I am connecting as to p0, it will apply the pool settings of the configured user.
Based on discussion here: pgbouncer#1228 Updating the database parameter name from `reserve_pool` to `reserve_pool_size` to be consistent with everything else.
Closes #166