Re: keepalives on MacOS X

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: keepalives on MacOS X
Дата
Msg-id 10707.1277786542@sss.pgh.pa.us
обсуждение исходный текст
Ответ на keepalives on MacOS X  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: keepalives on MacOS X  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> It looks like the recent keepalives patch won't support MacOS X,
> because MacOS X does not have the TCP_KEEPIDLE, TCP_KEEPINTVL, and
> TCP_KEEPCNT socket parameters.  It does have this:

It looks to me like there's support for setting KEEPIDLE and KEEPINTVL
via sysctl, but of course that's system-wide and presumably requires
root privilege to set.  (Apple seems to have inherited that from various
BSDen, btw; it's not unique to Darwin.)

> #define TCP_KEEPALIVE           0x10    /* idle time used when
> SO_KEEPALIVE is enabled */

> Should we try to support that as a synonym for TCP_KEEPIDLE, if that's
> what it is?  Or not worry about it?  Or... what?

Yeah, a bit of rooting around in the Darwin sources shows that this
value is used as a per-connection override for tcp_keepidle.  So it
is a synonym.  Not sure if it's worth supporting when the other value
can't be set too.  Maybe it'd be more useful to document that people can
set the system-wide values if they're desperate.
        regards, tom lane


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

Предыдущее
От: Fujii Masao
Дата:
Сообщение: Re: keepalives on MacOS X
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: suppress automatic recovery after back crash