implement user client idle timeout#1189
Conversation
JelteF
left a comment
There was a problem hiding this comment.
Overall looks like a fine change. But I'm curious why you need this feature. Also needs a merge conflict resolution.
|
|
||
| Set the maximum amount of time that a client is allowed to idly connect to | ||
| the pgbouncer instance. If set this timeout applies in addition to the | ||
| pgbouncer level config described above. |
There was a problem hiding this comment.
The global setting notes this:
This should be larger than the client-side connection lifetime settings, and only used for network problems.
I guess that's not true for your usecase, otherwise you probably wouldn't need this at the user level. But that does make me curious what your usecase is.
There was a problem hiding this comment.
The usecase is that I manage a multi tenant database with users of various levels of trustworthiness. Users who connect via a client connection Pooled application are more trustworthy. Users who connect via psql or pgadmin are less trustworthy. Would like the ability to give untrustworthy users more strict settings around stuff like idle sessions or idle transactions.
Honestly idle sessions are not the biggest deal, especially compared to idle transaction, but I figured I would put together a PR as it is a fairly easy implementation.
Co-authored-by: Jelte Fennema-Nio <github-tech@jeltef.nl>
|
One thing about this PR is that it applies in addition to the global level setting. Most of the more granular settings appear to replace the global level settings. I realized this after raising the PR. If you want this can be reworked to act in the same manner. |
This PR implements a user level version of the client_idle_timeout.
This PR implement a user level version of the client_idle_timeout.