"Jeroen T. Vermeulen" <jtv@xs4all.nl> writes:
> On Sat, Sep 18, 2004 at 02:32:32PM -0400, Tom Lane wrote:
>> If there's a communications
>> problem, it might take awhile to detect connection loss ... but if
>> there's a communications problem, you probably aren't going to be able
>> to open a new connection, either.
> Unfortunately, a communications problem is exactly the kind of scenario
> we were talking about in the first place! Might be a misguided firewall,
> for instance. (In which case we'd want the TCP connection to time out
> quickly on the server as well to avoid piling up dead backends, but that's
> another matter).
Well, I think it would time out quickly --- anyway on the order of
minutes not hours. By hypothesis, the situation you're worried about is
where the backend was unable to send you a COMMIT acknowledgement
message. The kernel is going to realize that it didn't get an ACK back,
and is going to retry a few times, and is then going to declare the
connection lost. The case where you may have a very long delay before
detection of connection loss is where the backend is sitting idle with
nothing to send.
regards, tom lane