Re: 7.4Beta1 "failed to create socket: Address family not supported by protocol" - Mailing list pgsql-general

From Tom Lane
Subject Re: 7.4Beta1 "failed to create socket: Address family not supported by protocol"
Date
Msg-id 2153.1060611703@sss.pgh.pa.us
Whole thread Raw
In response to 7.4Beta1 "failed to create socket: Address family not supported by protocol"  (Robert Creager <Robert_Creager@LogicalChaos.org>)
Responses Re: 7.4Beta1 "failed to create socket: Address family not
List pgsql-general
Robert Creager <Robert_Creager@LogicalChaos.org> writes:
> Aug 10 14:11:27 thunder postgres[18613]: [1-1] LOG:  failed to create
> socket: Address family not supported by protocol

It's normal for this to happen if you have userland (libc) code that
supports IPv6 but your kernel isn't configured to do so.  The postmaster
will try to create both IPv4 and IPv6 sockets, because getaddrinfo()
told it to, but the IPv6 attempt will fail as above.

However, I can see that this is going to become a FAQ if we leave the
behavior alone.  I am wondering if we can suppress this message without
making life difficult for people who are trying to debug actual problems
in setting up sockets.

We could just ignore EAFNOSUPPORT failures, but I'm not sure if there
are any cases where such an error would genuinely be interesting.
Another possibility is to issue the per-failure messages at a very low
level (DEBUG2 maybe) and only LOG when we can't create any socket at
all.  Perhaps there are better answers.  Any ideas?

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: How to prevent vacuum and reindex from deadlocking.
Next
From: Tom Lane
Date:
Subject: Re: Concatenating String Literals in pgsql