Re: Timeout and wait-forever in sync rep

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Timeout and wait-forever in sync rep
Date: 2010-10-18 07:03:50
Message-ID: AANLkTing6ncNwRZdNjvgH0exxHB5=C+E-h7JrBxdcrTv@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Oct 16, 2010 at 12:43 AM, Simon Riggs <simon(at)2ndquadrant(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2010-10-18 08:31:03 Re: Timeline in the light of Synchronous replication
Previous Message Samuel Gendler 2010-10-18 06:13:01 Re: No hash join across partitioned tables?