From: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> |
---|---|
To: | "Nagaura, Ryohei" <nagaura(dot)ryohei(at)jp(dot)fujitsu(dot)com> |
Cc: | "Jamison, Kirk" <k(dot)jamison(at)jp(dot)fujitsu(dot)com>, "Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com>, 'Michael Paquier' <michael(at)paquier(dot)xyz>, "AYahorau(at)ibagroup(dot)eu" <AYahorau(at)ibagroup(dot)eu>, "'pgsql-hackers(at)postgresql(dot)org'" <pgsql-hackers(at)postgresql(dot)org>, "MikalaiKeida(at)ibagroup(dot)eu" <MikalaiKeida(at)ibagroup(dot)eu> |
Subject: | RE: Timeout parameters |
Date: | 2019-03-09 10:35:53 |
Message-ID: | alpine.DEB.2.21.1903091121280.17271@lancre |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hello Ryohei-san,
> About socket_timeout:
>> From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
>> are actually finished. I cannot say that I'm thrilled by that behavior. ISTM that libpq
>> should at least attempt to cancel the query
> Would you please tell me why you think so?
As I understand the "client-side timeout" use-case, as distinct from
network-issues-related timeouts proposed in the other patches, the point
is more or less to deal with an overloaded server.
As it is currently implemented, the connection is broken abruptly when the
timeout is reached, but that the initial query goes on nevertheless
server-side, and a new connection is created which would worsens the load.
ISTM that it would be more appropriate to cancel the query and possibly
keep the connection, if possible.
> If it was implemented so, timeout couldn't work when the server is so
> busy that can't process a cancel request.
Hmmm. I do not understand how you would know that.
The timeout is raised because getting the result takes time, which may be
simply because the query really takes time, and it does not imply that the
server would not be able to process a cancel request. You could at least
send it before trying the extreme approach.
If the server is really overloaded, the current implementation does not
help in any way but contributes to worsen the situation, hence my lack of
enthousiasm.
> If the client encounters such a case, how does the client stop to wait the server?
> How does the client release its resources?
> Socket_timeout is helpful for such clients.
--
Fabien.
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2019-03-09 13:28:22 | Re: Should we increase the default vacuum_cost_limit? |
Previous Message | David Rowley | 2019-03-09 09:28:12 | Re: Should we increase the default vacuum_cost_limit? |