From: | Florian Pflug <fgp(at)phlo(dot)org> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
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:40:41 |
Message-ID: | 25D3F1F4-1099-431F-9D75-1E0D56B0A383@phlo.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
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:
>>> On Wed, 2010-06-23 at 21:54 +0000, Robert Haas wrote:
>>>> 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.
>>
>>> 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?
best regards,
Florian Pflug
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2010-06-24 14:45:45 | Re: [COMMITTERS] pgsql: Add TCP keepalive support to libpq. |
Previous Message | Robert Haas | 2010-06-24 14:30:59 | Re: [COMMITTERS] pgsql: Add TCP keepalive support to libpq. |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2010-06-24 14:40:59 | Re: TCP keepalive support for libpq |
Previous Message | Tom Lane | 2010-06-24 14:32:00 | Re: EOL is when? |