From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: keepalives on MacOS X |
Date: | 2010-06-29 04:42:22 |
Message-ID: | 10707.1277786542@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Robert Haas <robertmhaas(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Fujii Masao | 2010-06-29 05:22:44 | Re: suppress automatic recovery after back crash |
Previous Message | Fujii Masao | 2010-06-29 03:48:08 | Re: keepalives on MacOS X |