Re: Timeout parameters

Fabien COELHO <coelho@cri.ensmp.fr>

From: Fabien COELHO <coelho@cri.ensmp.fr>
To: Robert Haas <robertmhaas@gmail.com>
Cc: "Nagaura, Ryohei" <nagaura.ryohei@jp.fujitsu.com>, "Jamison, Kirk" <k.jamison@jp.fujitsu.com>, "Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>, Michael Paquier <michael@paquier.xyz>, "AYahorau@ibagroup.eu" <AYahorau@ibagroup.eu>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>, "MikalaiKeida@ibagroup.eu" <MikalaiKeida@ibagroup.eu>
Date: 2019-03-13T06:05:05Z
Lists: pgsql-hackers
Hello Robert,

> <nagaura.ryohei@jp.fujitsu.com> wrote:
>> The main purpose of this parameter is to avoid client's waiting for DB server infinitely, not reducing the server's burden.
>> This results in not waiting end-user, which is most important.
>
> +1.  If the server fails to detect that the client has gone away,
> that's the server's problem.  The client is entirely entitled to be
> selfish if it so wishes.

With the current libpq implementation the server does not see that the 
client has gone away on a trivial "pg_sleep", where the load is definitely 
not an issue, so the server problem seems to be there already.

Also, I do not see the downside of sending a cancel query before severing 
the connection. If it is not processed, too bad, but if it is then it is 
for the better.

ISTM that the client can be selfish but nice about its timeout.

-- 
Fabien.


Commits

  1. Add support TCP user timeout in libpq and the backend server