On Wed, Jun 28, 2017 at 7:26 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Concretely, something like the attached. I have no way to test this
> locally, so I'm thinking of just pushing it and seeing what the buildfarm
> says.
! #if defined(TCP_KEEPIDLE)
! /* TCP_KEEPIDLE is the name of this option on Linux and *BSD */ if (setsockopt(port->sock, IPPROTO_TCP,
TCP_KEEPIDLE, (char *) &idle, sizeof(idle)) < 0) { elog(LOG, "setsockopt(TCP_KEEPIDLE)
failed:%m"); return STATUS_ERROR; }
! #elif defined(TCP_KEEPALIVE_THRESHOLD)
What about defining a PG_TCP_KEEPALIVE instead?
Side note: Windows has something with a different set of options:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms740476(v=vs.85).aspx
--
Michael
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs