Re: [BUGS] BUG #14720: getsockopt(TCP_KEEPALIVE) failed: Option notsupported by protocol
От | Michael Paquier |
---|---|
Тема | Re: [BUGS] BUG #14720: getsockopt(TCP_KEEPALIVE) failed: Option notsupported by protocol |
Дата | |
Msg-id | CAB7nPqTjucafvkZGusT2aJp2gHivgwxoEOBxQoSUPhKrEU41ew@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [BUGS] BUG #14720: getsockopt(TCP_KEEPALIVE) failed: Option not supported by protocol (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: [BUGS] BUG #14720: getsockopt(TCP_KEEPALIVE) failed: Option not supported by protocol
|
Список | pgsql-bugs |
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
В списке pgsql-bugs по дате отправления: