pgsql: Add TCP keepalive support to libpq.

From: rhaas(at)postgresql(dot)org (Robert Haas)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Add TCP keepalive support to libpq.
Date: 2010-06-23 21:54:14
Message-ID: 20100623215414.053427541D4@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Log Message:
-----------
Add TCP keepalive support to libpq.

This adds four additional connection parameters to libpq: keepalives,
keepalives_idle, keepalives_count, and keepalives_interval.
keepalives default to on, per discussion, but can be turned off by
specifying keepalives=0. The remaining parameters, where supported,
can be used to adjust how often keepalives are sent and how many
can be lost before the connection is broken.

The immediate motivation for this patch is to make sure that
walreceiver will eventually notice if the master reboots without
closing the connection cleanly, but it should be helpful in other
cases as well.

Tollef Fog Heen, Fujii Masao, and me.

Modified Files:
--------------
pgsql/doc/src/sgml:
libpq.sgml (r1.308 -> r1.309)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/libpq.sgml?r1=1.308&r2=1.309)
pgsql/src/interfaces/libpq:
fe-connect.c (r1.393 -> r1.394)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/interfaces/libpq/fe-connect.c?r1=1.393&r2=1.394)
libpq-int.h (r1.150 -> r1.151)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/interfaces/libpq/libpq-int.h?r1=1.150&r2=1.151)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message User Itagaki 2010-06-24 04:34:13 pgbulkload - pgbulkload: Disable PARALLEL writer because of bugs
Previous Message User Bmomjian 2010-06-23 20:10:50 pg-migrator - pg_migrator: Specify user names for all external commands

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2010-06-23 21:57:36 Re: extensible enum types
Previous Message Guillaume Lelarge 2010-06-23 21:29:29 Re: Cannot cancel the change of a tablespace