Re: 7.4Beta1 "failed to create socket: Address family not

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Creager <Robert_Creager(at)LogicalChaos(dot)org>, pgsql-general(at)postgreSQL(dot)org
Subject: Re: 7.4Beta1 "failed to create socket: Address family not
Date: 2003-08-11 22:12:48
Message-ID: 200308112212.h7BMCmr05900@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


My original commit had a message stating it was an IPv6 and the kernel
didn't support it. I don't see that message in CVS anymore, but I think
we need something similar.

There was a big discussion over whether we should require IPv6 to be
enabled individually, and then throw a hard error if IPv6 fails, but at
this stage, it seemed best to most to just try IPv6 and soft-fail, while
throwing a message in the server logs.

---------------------------------------------------------------------------

Tom Lane wrote:
> Robert Creager <Robert_Creager(at)LogicalChaos(dot)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
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message krystoffff 2003-08-11 22:18:35 optimisation of a code
Previous Message Gianni Mariani 2003-08-11 22:12:35 Re: public key functions for postgresql ?