Re: [COMMITTERS] pgsql: Add TCP keepalive support to libpq.

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Florian Pflug <fgp(at)phlo(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Robert Haas <rhaas(at)postgresql(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [COMMITTERS] pgsql: Add TCP keepalive support to libpq.
Date: 2010-06-24 14:45:45
Message-ID: AANLkTik7tKQZw76rk79G52yVCBDRTlBpRpX3KOT-sWuS@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Thu, Jun 24, 2010 at 10:40 AM, Florian Pflug <fgp(at)phlo(dot)org> wrote:
> On Jun 24, 2010, at 16:30 , Robert Haas wrote:
>> On Thu, Jun 24, 2010 at 10:13 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> Simon Riggs <simon(at)2ndQuadrant(dot)com> writes:
>>>> There isn't any need at at all for this. We can already add options on
>>>> the libpq connection line.
>>>
>>>> options = '-o tcp_keepalives_idle=X
>>>> tcp_keepalives_interval=Y
>>>> tcp_keepalives_count=Z'
>>>
>>> Huh?  The above is 100% fanciful; there was no code in libpq or anywhere
>>> else that would have processed such a thing.
>>
>> You can do this:
>>
>> psql "host=127.0.0.1 options='-c tcp_keepalives_idle=1'"
>
> Hm, seems a bit error-prone though. The difference between the above
>
> psql "host=127.0.0.1 keepalives=1"
>
> isn't immediately obvious I'd say.
>
> Should we maybe rename the libpq-side parameters to tcp_client_keepalives, tcp_client_keepalives_idle, tcp_client_keepalives_count and tcp_client_keepalives_interval? Or do we expect people who fiddle with those parameters to understand the subtle difference?

I think the existing names are fine - people should understand that
"options" means "server-side options" and that anything else is a
client-side option. However, if there's a strong consensus the other
way and someone feels like working up a patch, that's fine too.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2010-06-24 14:57:22 pgsql: Mention that when alter rewrites a table, indexes are also
Previous Message Florian Pflug 2010-06-24 14:40:41 Re: [COMMITTERS] pgsql: Add TCP keepalive support to libpq.

Browse pgsql-hackers by date

  From Date Subject
Next Message Carsten Kropf 2010-06-24 14:53:57 Re: TOAST issue on custom index access method
Previous Message Tom Lane 2010-06-24 14:40:59 Re: TCP keepalive support for libpq