diff options
author | Magnus Hagander <magnus@hagander.net> | 2010-07-08 10:20:14 +0000 |
---|---|---|
committer | Magnus Hagander <magnus@hagander.net> | 2010-07-08 10:20:14 +0000 |
commit | 44b0d1671a16cd2700eb7983b511a185bdb1b791 (patch) | |
tree | 7839de2236654fa236e30d81a0a7ae923fa7bc72 /doc/src | |
parent | d4d32eefdf3df4eb9aadea08e3d07af753457fbb (diff) | |
download | postgresql-44b0d1671a16cd2700eb7983b511a185bdb1b791.tar.gz postgresql-44b0d1671a16cd2700eb7983b511a185bdb1b791.zip |
Add support for TCP keepalives on Windows, both for backend and the new
libpq support.
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/config.sgml | 50 | ||||
-rw-r--r-- | doc/src/sgml/libpq.sgml | 28 |
2 files changed, 48 insertions, 30 deletions
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index e54b09545d0..2fbe6a8c24b 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -1,4 +1,4 @@ -<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.293 2010/07/06 22:55:26 rhaas Exp $ --> +<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.294 2010/07/08 10:20:13 mha Exp $ --> <chapter Id="runtime-config"> <title>Server Configuration</title> @@ -523,12 +523,17 @@ SET ENABLE_SEQSCAN TO OFF; </indexterm> <listitem> <para> - On systems that support the <symbol>TCP_KEEPIDLE</symbol> or - <symbol>TCP_KEEPALIVE</> socket option, specifies the - number of seconds between sending keepalives on an otherwise idle - connection. A value of zero uses the system default. If neither of - these socket options is supported, this parameter must be zero. This - parameter is ignored for connections made via a Unix-domain socket. + Specifies the number of seconds before sending a keepalive packet on an otherwise idle + connection. A value of 0 uses the system default. This parameter is supported + only on systems that support the <symbol>TCP_KEEPIDLE</> or <symbol>TCP_KEEPALIVE</> + symbols, and on Windows; on other systems, it must be zero. This parameter is + ignored for connections made via a Unix-domain socket. + <note> + <para> + On Windows, a value of 0 will set this parameter to 2 hours, + since Windows does not provide a way to read the default value. + </para> + </note> </para> </listitem> </varlistentry> @@ -540,11 +545,17 @@ SET ENABLE_SEQSCAN TO OFF; </indexterm> <listitem> <para> - On systems that support the <symbol>TCP_KEEPINTVL</symbol> socket option, specifies how - long, in seconds, to wait for a response to a keepalive before - retransmitting. A value of zero uses the system default. If <symbol>TCP_KEEPINTVL</symbol> - is not supported, this parameter must be zero. This parameter is ignored - for connections made via a Unix-domain socket. + Specifies the number of seconds between sending keepalives on an otherwise idle + connection. A value of 0 uses the system default. This parameter is supported + only on systems that support the <symbol>TCP_KEEPINTVL</> + symbol, and on Windows; on other systems, it must be zero. This parameter is + ignored for connections made via a Unix-domain socket. + <note> + <para> + On Windows, a value of 0 will set this parameter to 1 second, + since Windows does not provide a way to read the default value. + </para> + </note> </para> </listitem> </varlistentry> @@ -556,11 +567,16 @@ SET ENABLE_SEQSCAN TO OFF; </indexterm> <listitem> <para> - On systems that support the <symbol>TCP_KEEPCNT</symbol> socket option, specifies how - many keepalives can be lost before the connection is considered dead. - A value of zero uses the system default. If <symbol>TCP_KEEPCNT</symbol> is not - supported, this parameter must be zero. This parameter is ignored - for connections made via a Unix-domain socket. + Specifies the number of keepalive packets to send on an otherwise idle + connection. A value of 0 uses the system default. This parameter is supported + only on systems that support the <symbol>TCP_KEEPCNT</> + symbol; on other systems, it must be zero. This parameter is + ignored for connections made via a Unix-domain socket. + <note> + <para> + This parameter is not supported on Windows, and must be zero. + </para> + </note> </para> </listitem> </varlistentry> diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml index f70541bb7f1..9e047b110d7 100644 --- a/doc/src/sgml/libpq.sgml +++ b/doc/src/sgml/libpq.sgml @@ -1,4 +1,4 @@ -<!-- $PostgreSQL: pgsql/doc/src/sgml/libpq.sgml,v 1.312 2010/07/06 21:14:25 rhaas Exp $ --> +<!-- $PostgreSQL: pgsql/doc/src/sgml/libpq.sgml,v 1.313 2010/07/08 10:20:14 mha Exp $ --> <chapter id="libpq"> <title><application>libpq</application> - C Library</title> @@ -298,10 +298,11 @@ <para> Controls the number of seconds of inactivity after which TCP should send a keepalive message to the server. A value of zero uses the - system default. This parameter is ignored if the neither the - <symbol>TCP_KEEPIDLE</> nor the <symbol>TCP_KEEPALIVE</> socket - options are supported, for connections made via a Unix-domain - socket, or if keepalives are disabled. + system default. This parameter is ignored for connections made via a + Unix-domain socket, or if keepalives are disabled. It is only supported + on systems where the <symbol>TCP_KEEPIDLE</> or <symbol>TCP_KEEPALIVE</> + socket option is available, and on Windows; on other systems, it has no + effect. </para> </listitem> </varlistentry> @@ -312,10 +313,11 @@ <para> Controls the number of seconds after which a TCP keepalive message that is not acknowledged by the server should be retransmitted. A - value of zero uses the system default. This parameter is ignored if - the <symbol>TCP_KEEPINTVL</> socket option is not supported, for - connections made via a Unix-domain socket, or if keepalives are - disabled. + value of zero uses the system default. This parameter is ignored for + connections made via a Unix-domain socket, or if keepalives are disabled. + It is only supported on systems where the <symbol>TCP_KEEPINTVL</> + socket option is available, and on Windows; on other systems, it has no + effect. </para> </listitem> </varlistentry> @@ -326,10 +328,10 @@ <para> Controls the number of TCP keepalives that can be lost before the client's connection to the server is considered dead. A value of - zero uses the system default. This parameter is ignored if the - <symbol>TCP_KEEPCNT</> socket option is not supported, for - connections made via a Unix-domain socket, or if keepalives are - disabled. + zero uses the system default. This parameter is ignored for + connections made via a Unix-domain socket, or if keepalives are disabled. + It is only supported on systems where the <symbol>TCP_KEEPINTVL</> + socket option is available; on other systems, it has no effect. </para> </listitem> </varlistentry> |