Re: Timeout parameters - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: Timeout parameters
Date
Msg-id alpine.DEB.2.21.1903131818060.4059@lancre
Whole thread Raw
In response to Re: Timeout parameters  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Timeout parameters
List 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.


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: using index or check in ALTER TABLE SET NOT NULL
Next
From: Robert Haas
Date:
Subject: Re: using index or check in ALTER TABLE SET NOT NULL