Re: [PATCHES] Implement support for TCP_KEEPCNT, TCP_KEEPIDLE, TCP_KEEPINTVL (was Re: [HACKERS] Feature freeze date for 8.1)

Tom Lane <[email protected]> Thu, 08 Sep 2005 19:20:22 -0400
Newsgroups gmane.comp.db.postgresql.devel.win32,gmane.comp.db.postgresql.devel.patches
Message-ID <[email protected]>
Oliver Jowett <[email protected]> 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

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to [email protected] so that your
       message can get through to the mailing list cleanly