Re: Terminate the idle sessions
David G. Johnston <david.g.johnston@gmail.com>
From: "David G. Johnston" <david.g.johnston@gmail.com>
To: Li Japin <japinli@hotmail.com>
Cc: "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2020-06-09T14:35:08Z
Lists: pgsql-hackers
On Tuesday, June 9, 2020, Li Japin <japinli@hotmail.com> wrote: > Hi, hackers > > When some clients connect to database in idle state, postgres do not close > the idle sessions, > here i add a new GUC idle_session_timeout to let postgres close the idle > sessions, it samilar > to idle_in_transaction_session_timeout > I’m curious as to the use case because I cannot imagine using this. Idle connections are normal. Seems better to monitor them and conditionally execute the disconnect backend function from the monitoring layer than indiscriminately disconnect based upon time. Though i do see an interesting case for attaching to specific login user accounts that only manually login and want the equivalent of a timed screen lock. David J.
Commits
-
Rethink SQLSTATE code for ERRCODE_IDLE_SESSION_TIMEOUT.
- 4edf96846a02 14.0 landed
-
Improve commentary in timeout.c.
- 9486e7b666fd 14.0 landed
-
Add idle_session_timeout.
- 9877374bef76 14.0 landed
-
Improve timeout.c's handling of repeated timeout set/cancel.
- 09cf1d522676 14.0 landed