On Sat, Oct 16, 2010 at 12:43 AM, Simon Riggs <si...@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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers