Re: PostgreSQL 7.4devel - LOG: PGSTAT: socket() failed: Invalid argument - Mailing list pgsql-hackers

From qhwt@myrealbox.com
Subject Re: PostgreSQL 7.4devel - LOG: PGSTAT: socket() failed: Invalid argument
Date
Msg-id 20030709074034.GA8129@myrealbox.com
Whole thread Raw
In response to Re: PostgreSQL 7.4devel - LOG: PGSTAT: socket() failed: Invalid argument  (Kurt Roeckx <Q@ping.be>)
List pgsql-hackers
Hello,

> On Mon, Jul 07, 2003 at 12:55:06AM +0900, qhwt@myrealbox.com wrote:
> > 
> > When hints.ai_family is PF_UNSPEC, getaddrinfo() returns two entries,
> > first one being IPv6 one, and the second one is IPv4 one, even if
> > IPv6 support is not compiled in the kernel(this is true at least on
> > my FreeBSD box).

Sorry, this turned out to be bogus; AI_ADDRCONFIG flag was already present as
early as FreeBSD 4.3-RELEASE, but I forgot adding the flag in my test code.
The flag is not documented in the getaddrinfo(3) man page.

On Sun, Jul 06, 2003 at 06:35:52PM +0200, Kurt Roeckx wrote:
> And that is why you have AI_ADDRCONFIG, which seems to be broken
> for him.

I doubt RedHat 6 or MacOS X really support AI_ADDRCONFIG. Is it actually
defined somewhere in the system headers? Anyway it seems like its absence
is hidden by the following lines:

src/include/libpq/pqcomm.h:
85-/* Some systems don't have it, so default it to 0 so it doesn't
86- * have any effect on those systems. */
87:#ifndef      AI_ADDRCONFIG
88:#define      AI_ADDRCONFIG 0
89-#endif


pgsql-hackers by date:

Previous
From: Kenji Sugita
Date:
Subject: Re: PostgreSQL 7.4devel - LOG: PGSTAT: socket() failed:
Next
From: Carlos Guzman Alvarez
Date:
Subject: Re: CREATE DATABASE command in Extended Query mode of 3.0