tcp_keepalives_idle

Lists: pgsql-hackers
From: Tatsuo Ishii <ishii(at)postgresql(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: tcp_keepalives_idle
Date: 2013-11-14 05:38:49
Message-ID: 20131114.143849.439039023060034798.t-ishii@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

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


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tatsuo Ishii <ishii(at)postgresql(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: tcp_keepalives_idle
Date: 2013-11-14 06:02:11
Message-ID: 14977.1384408931@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Tatsuo Ishii <ishii(at)postgresql(dot)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


From: Tatsuo Ishii <ishii(at)postgresql(dot)org>
To: tgl(at)sss(dot)pgh(dot)pa(dot)us
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: tcp_keepalives_idle
Date: 2013-11-14 06:08:06
Message-ID: 20131114.150806.1942977912940314596.t-ishii@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

> Tatsuo Ishii <ishii(at)postgresql(dot)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


From: Marko Tiikkaja <marko(at)joh(dot)to>
To: Tatsuo Ishii <ishii(at)postgresql(dot)org>, tgl(at)sss(dot)pgh(dot)pa(dot)us
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: tcp_keepalives_idle
Date: 2013-11-14 10:32:23
Message-ID: 5284A6B7.90600@joh.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

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:
http://www.postgresql.org/message-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


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Marko Tiikkaja <marko(at)joh(dot)to>
Cc: Tatsuo Ishii <ishii(at)postgresql(dot)org>, tgl(at)sss(dot)pgh(dot)pa(dot)us, pgsql-hackers(at)postgresql(dot)org
Subject: Re: tcp_keepalives_idle
Date: 2014-03-08 03:03:42
Message-ID: 20140308030342.GE16324@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

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:
> http://www.postgresql.org/message-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(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Marko Tiikkaja <marko(at)joh(dot)to>
Cc: Tatsuo Ishii <ishii(at)postgresql(dot)org>, tgl(at)sss(dot)pgh(dot)pa(dot)us, pgsql-hackers(at)postgresql(dot)org
Subject: Re: tcp_keepalives_idle
Date: 2014-03-08 03:05:54
Message-ID: 20140308030554.GF16324@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

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:
> > http://www.postgresql.org/message-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(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

Attachment Content-Type Size
keepalive.diff text/x-diff 2.9 KB