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.