Re: Terminate the idle sessions

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Cary Huang <cary(dot)huang(at)highgo(dot)ca>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Terminate the idle sessions
Date: 2020-08-10 21:49:36
Message-ID: CAKFQuwaTBdhhii+XV5-M_fdYw1bARTA2pq4twU622+xFE7rT0g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Aug 10, 2020 at 2:43 PM Cary Huang <cary(dot)huang(at)highgo(dot)ca> wrote:

> There is currently no enforced minimum value for "idle_session_timeout"
> (except for value 0 for disabling the feature), so user can put any value
> larger than 0 and it could be very small like 500 or even 50 millisecond,
> this would make any psql connection to disconnect shortly after it has
> connected, which may not be ideal. Many systems I have worked with have 30
> minutes inactivity timeout by default, and I think it would be better and
> safer to enforce a reasonable minimum timeout value

I'd accept a value of say 1,000 being minimum in order to reinforce the
fact that a unit-less input, while possible, is taken to be milliseconds
and such small values most likely mean the user has made a mistake. I
would not choose a minimum allowed value solely based on our concept of
"reasonable". I don't imagine a value of say 10 seconds, while seemingly
unreasonable, is going to be unsafe.

David J.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2020-08-10 22:27:17 Re: Add LWLock blocker(s) information
Previous Message Cary Huang 2020-08-10 21:42:42 Re: Terminate the idle sessions