tcp_keepalives_idle

Started by Tatsuo Ishiiabout 12 years ago6 messages
#1Tatsuo Ishii
ishii@postgresql.org

Hi,

I am struggling to understand what following phrase says:

tcp_keepalives_idle (integer)
Specifies the number of seconds before sending a keepalive packet
on an otherwise idle connection.

What I am not sure is the meaning of "otherwise". Can I safely replace
it to:
Specifies the number of seconds before sending a keepalive packet
on an other side of idle connection.

What I try to want to mean here is, "other side" is frontend side
connection point.

Or I am completely misunderstanding?
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Tatsuo Ishii (#1)
Re: tcp_keepalives_idle

Tatsuo Ishii <ishii@postgresql.org> writes:

I am struggling to understand what following phrase says:

tcp_keepalives_idle (integer)
Specifies the number of seconds before sending a keepalive packet
on an otherwise idle connection.

It means "the connection is idle except for keepalive packets".
We could perhaps just drop the word "otherwise", if people find
it confusing.

What I am not sure is the meaning of "otherwise". Can I safely replace
it to:
Specifies the number of seconds before sending a keepalive packet
on an other side of idle connection.

No, that's not a good fix.

regards, tom lane

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#3Tatsuo Ishii
ishii@postgresql.org
In reply to: Tom Lane (#2)
Re: tcp_keepalives_idle

Tatsuo Ishii <ishii@postgresql.org> writes:

I am struggling to understand what following phrase says:

tcp_keepalives_idle (integer)
Specifies the number of seconds before sending a keepalive packet
on an otherwise idle connection.

It means "the connection is idle except for keepalive packets".
We could perhaps just drop the word "otherwise", if people find
it confusing.

Wah. I seemed to completely misunderstand what the pharase
says. Thanks for clarification. I agree to drop "otherwise".

What I am not sure is the meaning of "otherwise". Can I safely replace
it to:
Specifies the number of seconds before sending a keepalive packet
on an other side of idle connection.

No, that's not a good fix.

Sure. I was absolutely misunderstood.
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#4Marko Tiikkaja
marko@joh.to
In reply to: Tatsuo Ishii (#3)
Re: tcp_keepalives_idle

On 11/14/13 7:08 AM, Tatsuo Ishii wrote:

It means "the connection is idle except for keepalive packets".
We could perhaps just drop the word "otherwise", if people find
it confusing.

Wah. I seemed to completely misunderstand what the pharase
says. Thanks for clarification. I agree to drop "otherwise".

I had some problem interpreting these explanations as well:
/messages/by-id/527A21F1.2000408@joh.to

Compare that to the description in the libpq documentation: "Controls
the number of seconds of inactivity after which TCP should send a
keepalive message to the server.".

Regards,
Marko Tiikkaja

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#5Bruce Momjian
bruce@momjian.us
In reply to: Marko Tiikkaja (#4)
Re: tcp_keepalives_idle

On Thu, Nov 14, 2013 at 11:32:23AM +0100, Marko Tiikkaja wrote:

On 11/14/13 7:08 AM, Tatsuo Ishii wrote:

It means "the connection is idle except for keepalive packets".
We could perhaps just drop the word "otherwise", if people find
it confusing.

Wah. I seemed to completely misunderstand what the pharase
says. Thanks for clarification. I agree to drop "otherwise".

I had some problem interpreting these explanations as well:
/messages/by-id/527A21F1.2000408@joh.to

Compare that to the description in the libpq documentation:
"Controls the number of seconds of inactivity after which TCP should
send a keepalive message to the server.".

Good point. I have improved the server-side keepalive parameter
descriptions to use the superior libpq text, with adjustment.

Applied patch attached.

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#6Bruce Momjian
bruce@momjian.us
In reply to: Bruce Momjian (#5)
1 attachment(s)
Re: tcp_keepalives_idle

On Fri, Mar 7, 2014 at 10:03:42PM -0500, Bruce Momjian wrote:

On Thu, Nov 14, 2013 at 11:32:23AM +0100, Marko Tiikkaja wrote:

On 11/14/13 7:08 AM, Tatsuo Ishii wrote:

It means "the connection is idle except for keepalive packets".
We could perhaps just drop the word "otherwise", if people find
it confusing.

Wah. I seemed to completely misunderstand what the pharase
says. Thanks for clarification. I agree to drop "otherwise".

I had some problem interpreting these explanations as well:
/messages/by-id/527A21F1.2000408@joh.to

Compare that to the description in the libpq documentation:
"Controls the number of seconds of inactivity after which TCP should
send a keepalive message to the server.".

Good point. I have improved the server-side keepalive parameter
descriptions to use the superior libpq text, with adjustment.

Applied patch attached.

Oops, now attached.

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

Attachments:

keepalive.difftext/x-diff; charset=us-asciiDownload
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
new file mode 100644
index 86dbd0f..2811f11
*** a/doc/src/sgml/config.sgml
--- b/doc/src/sgml/config.sgml
*************** include 'filename'
*** 684,691 ****
        </indexterm>
        <listitem>
         <para>
!         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.
--- 684,692 ----
        </indexterm>
        <listitem>
         <para>
!         Specifies the number of seconds of inactivity after which TCP
!         should send a keepalive message to the client.  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.
*************** include 'filename'
*** 708,715 ****
        </indexterm>
        <listitem>
         <para>
!         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.
--- 709,717 ----
        </indexterm>
        <listitem>
         <para>
!         Specifies the number of seconds after which a TCP keepalive message
!         that is not acknowledged by the client should be retransmitted.
!         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.
*************** include 'filename'
*** 732,739 ****
        </indexterm>
        <listitem>
         <para>
!         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.
          In sessions connected via a Unix-domain socket, this parameter is
--- 734,742 ----
        </indexterm>
        <listitem>
         <para>
!         Specifies the number of TCP keepalives that can be lost before
!         the server's connection to the client is considered dead.  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.
          In sessions connected via a Unix-domain socket, this parameter is