Re: PostgreSQL 7.4devel - LOG: PGSTAT: socket() failed: Invalid argument

From: qhwt(at)myrealbox(dot)com
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: PostgreSQL 7.4devel - LOG: PGSTAT: socket() failed: Invalid argument
Date: 2003-07-09 07:40:34
Message-ID: 20030709074034.GA8129@myrealbox.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello,

> On Mon, Jul 07, 2003 at 12:55:06AM +0900, qhwt(at)myrealbox(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Carlos Guzman Alvarez 2003-07-09 08:20:34 Re: CREATE DATABASE command in Extended Query mode of 3.0
Previous Message Kenji Sugita 2003-07-09 05:34:37 Re: PostgreSQL 7.4devel - LOG: PGSTAT: socket() failed: