Robert Haas <robertmh...@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

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to