Re: Implement support for TCP_KEEPCNT, TCP_KEEPIDLE, TCP_KEEPINTVL (was Re: [HACKERS] Feature freeze date for 8.1) - Mailing list pgsql-patches

From Tom Lane
Subject Re: Implement support for TCP_KEEPCNT, TCP_KEEPIDLE, TCP_KEEPINTVL (was Re: [HACKERS] Feature freeze date for 8.1)
Date
Msg-id 26590.1126221622@sss.pgh.pa.us
Whole thread Raw
In response to Re: Implement support for TCP_KEEPCNT, TCP_KEEPIDLE, TCP_KEEPINTVL  (Oliver Jowett <oliver@opencloud.com>)
Responses Re: Implement support for TCP_KEEPCNT, TCP_KEEPIDLE, TCP_KEEPINTVL
List pgsql-patches
Oliver Jowett <oliver@opencloud.com> writes:
> Merlin Moncure wrote:
>> Even better would be a stronger test to make sure o/s supports this
>> feature.

> Well, the code assumes that if the TCP_* constants are present then they
> can be used. It seems a bit stupid if Windows defines them but doesn't
> support them at all.

Mmmm ... we learned the hard way that header files, userland libraries,
and kernel behavior aren't necessarily synchronized.  Certainly you
can't build the code if the header files don't define the TCP_ symbols
for you, but it's a serious mistake to assume that the kernel will take
the values just because there's a header that defines them.  See the
archives from back when we were trying to get the IPv6 code to be
portable.

I'd actually expect these things to be in closer sync on a Windows
machine than on the average Linux machine.  The problem with Windows is
that we're trying to support building an executable on one flavor of
Windows and then running it on other flavors --- so again, what you
saw in the headers need not match what the kernel will do.

In short, if you were assuming that then you'd better fix the code.

            regards, tom lane

pgsql-patches by date:

Previous
From: Oliver Jowett
Date:
Subject: Re: Implement support for TCP_KEEPCNT, TCP_KEEPIDLE, TCP_KEEPINTVL
Next
From: Oliver Jowett
Date:
Subject: Re: Implement support for TCP_KEEPCNT, TCP_KEEPIDLE, TCP_KEEPINTVL