Re: Timeout and wait-forever in sync rep - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: Timeout and wait-forever in sync rep
Date
Msg-id AANLkTing6ncNwRZdNjvgH0exxHB5=C+E-h7JrBxdcrTv@mail.gmail.com
Whole thread Raw
In response to Re: Timeout and wait-forever in sync rep  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: Timeout and wait-forever in sync rep
List pgsql-hackers
On Sat, Oct 16, 2010 at 12:43 AM, Simon Riggs <simon@2ndquadrant.com> wrote:
>> But they cannot
>>   detect the disconnection in some cases. So replication_timeout needs
>>   to be introduced for sync rep.
>
> When exactly don't the keepalives work?

The keepalives don't work at least on linux when the connection is terminated
after sending a packet and before receiving TCP-level ACK. You can confirm
this by unplugging the LAN cable from a client server while running pgbench
on a client. In this case, even if you specify tcp_keepalives_*, backends
would not be able to detect the disconnection. But note that this doesn't
always happen. Which depends on the timing.

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center


pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Serializable snapshot isolation patch
Next
From: Fujii Masao
Date:
Subject: Re: Timeline in the light of Synchronous replication