Re: TCP keepalive support for libpq

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: TCP keepalive support for libpq
Дата
Msg-id AANLkTinb17E3wH_2y19kJsO6-BoKMk50_wmHqmy_a7Ft@mail.gmail.com
обсуждение исходный текст
Ответ на Re: TCP keepalive support for libpq  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: TCP keepalive support for libpq  (Robert Haas <robertmhaas@gmail.com>)
Re: TCP keepalive support for libpq  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On Tue, Jun 22, 2010 at 18:16, Robert Haas <robertmhaas@gmail.com> wrote:
> On Tue, Jun 22, 2010 at 9:27 AM, Magnus Hagander <magnus@hagander.net> wrote:
>>> I am inclined to punt the keepalives_interval, keepalives_idle, and
>>> keepalives_count parameters to 9.1.  If these are needed for
>>> walreciever to work reliably, this whole approach is a dead-end,
>>> because those parameters are not portable.  I will post a patch later
>>> today along these lines.
>>
>> Do we know how unportable? If it still helps the majority, it might be
>> worth doing. But I agree, if it's not really needed for walreceiver,
>> then it should be punted to 9.1.
>
> This might not be such a good idea as I had thought.  It looks like
> the default parameters on Linux (Fedora 12) are:
>
> tcp_keepalive_intvl:75
> tcp_keepalive_probes:9
> tcp_keepalive_time:7200
>
> [ See also http://tldp.org/HOWTO/TCP-Keepalive-HOWTO/usingkeepalive.html ]
>
> That's clearly better than no keepalives, but I venture to say it's
> not going to be anything close to the behavior people want for
> walreceiver...  I think we're going to need to either vastly reduce
> the keepalive time and interval, or abandon the strategy of using TCP
> keepalives completely.
>
> Which brings us to the question of portability.  A quick search around
> the Internet suggests that this is supported on recent versions of
> Linux, Free/OpenBSD, AIX, and HP/UX, and it appears to work on my Mac
> also.  I'm not clear how long it's been implemented on each of these
> platforms, though.  With respect to Windows, it looks like there are
> registry settings for all of these parameters, but I'm unclear whether
> they can be set on a per-connection basis and what's required to make
> this happen.

I looked around quickly earlier when we chatted about this, and I
think I found an API call to change them for a socket as well - but a
Windows specific one, not the ones you'd find on Unix...


-- Magnus HaganderMe: http://www.hagander.net/Work: http://www.redpill-linpro.com/


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: pg_upgrade issues
Следующее
От: Robert Haas
Дата:
Сообщение: Re: TCP keepalive support for libpq