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: "kuroda.hayato@fujitsu.com" <kuroda.hayato@fujitsu.com>, Kyotaro Horiguchi <horikyota.ntt@gmail.com>, Thomas Munro <thomas.munro@gmail.com>, "bharath.rupireddyforpostgres@gmail.com" <bharath.rupireddyforpostgres@gmail.com>, "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>
Date: 2020-11-24T15:20:15Z
Lists: pgsql-hackers
On Mon, Nov 23, 2020 at 11:22 PM Li Japin <japinli@hotmail.com> wrote:

>
> How about use “foreign-data wrapper” replace “postgres_fdw”?
>

I don't see much value in avoiding mentioning that specific term - my
proposal turned it into an example instead of being exclusive.


> -         This parameter should be set to zero if you use some
> connection-pooling software,
> -         or pg servers used by postgres_fdw, because connections might be
> closed unexpectedly.
> +         This parameter should be set to zero if you use
> connection-pooling software,
> +         or <productname>PostgreSQL</productname> servers connected to
> using foreign-data
> +         wrapper, because connections might be closed unexpectedly.
>          </para>
>

Maybe:

+ or your PostgreSQL server receives connection from postgres_fdw or
similar middleware.
+ Such software is expected to self-manage its connections.
David J.

Commits

  1. Rethink SQLSTATE code for ERRCODE_IDLE_SESSION_TIMEOUT.

  2. Improve commentary in timeout.c.

  3. Add idle_session_timeout.

  4. Improve timeout.c's handling of repeated timeout set/cancel.