Re: Timeout parameters

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: "Nagaura, Ryohei" <nagaura(dot)ryohei(at)jp(dot)fujitsu(dot)com>, "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-13 17:25:08
Message-ID: alpine.DEB.2.21.1903131818060.4059@lancre
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Hello Robert,

>> 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.
>
> If the network connection is dead, which is the situation the patch
> intends to detect,

Hmmm... ISTM that we are not talking about the same patch...

My point is about the "socket_timeout" patch which timeout on not
receiving an answer, but is not related to the network connection.

The other two patches, however, deal with tcp timeout both client & server
side, and are indeed more related to the network connection. Sending
request on a tcp timeout would not make much sense, but this is not the
proposal here.

> then PQcancel() isn't going to work, but it might still hang for a
> period of time or forever. That seems like a pretty major downside.

The fact that no answer data is received may mean that it takes time to
compute the result, so cancelling seems appropriate to me, rather than
severing the connection and starting a new one immediately, leaving the
server loaded with its query.

--
Fabien.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2019-03-13 17:25:11 Re: using index or check in ALTER TABLE SET NOT NULL
Previous Message Robert Haas 2019-03-13 17:24:29 Re: using index or check in ALTER TABLE SET NOT NULL