Re: Terminate the idle sessions

Japin Li <japinli@hotmail.com>

From: Li Japin <japinli@hotmail.com>
To: "kuroda.hayato@fujitsu.com" <kuroda.hayato@fujitsu.com>
Cc: 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-15T10:00:01Z
Lists: pgsql-hackers

Attachments

On Nov 13, 2020, at 6:27 PM, kuroda.hayato@fujitsu.com<mailto:kuroda.hayato@fujitsu.com> wrote:


I read your patch, and I think the documentation is too simple to avoid all problems.
(I think if some connection pooling is used, the same problem will occur.)
Could you add some explanations in the doc file? I made an example:

```
Note that this values should be set to zero if you use postgres_fdw or some
Connection-pooling software, because connections might be closed unexpectedly.
```

Thanks for your advice! Attached v4.

--
Best regards
Japin Li

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.