AIX and getaddrinfo (was Re: Upgrade problem)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bill Kurland <bill(at)shakespeare-nyc(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: AIX and getaddrinfo (was Re: Upgrade problem)
Date: 2006-11-27 18:28:33
Message-ID: 21622.1164652113@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Bill Kurland <bill(at)shakespeare-nyc(dot)com> writes:
> I did a google search on AIX + getaddrinfo and found
> http://lists.samba.org/archive/rsync/2002-April/002063.html
> In that context the author says that adding the port number in
> etc/services solved his problem with getaddrinfo.

Interesting. I wonder whether IBM thinks that there is some
security-related reason for only allowing programs to bind to port
numbers that are listed in /etc/services?

> So I tried that and,
> lo, it has some effect, though I'm not sure it's 100% desirable. The log
> entry is:

> LOG: could not bind IPv6 socket: The type of socket is not supported in
> this protocol family.
> HINT: Is another postmaster already running on port 5432? If not, wait
> a few seconds and retry.

I think this is OK. There are many machines on which the userspace
code supports IPv6 while the kernel doesn't, or vice versa. It looks
to me like getaddrinfo returned both IPv4 and IPv6 translations of
"localhost", but the kernel rejected the IPv6 version when PG tried it.
Since you evidently have a working IPv4 port, there's nothing to worry
about. If it really bugs you, the /etc/netsvc.conf change suggested in
our FAQ_AIX would probably suppress the log message.

Can anyone else confirm the behavior of getaddrinfo wanting port 5432
to be listed in /etc/services? If this is real, we ought to have
something about it in FAQ_AIX.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron Johnson 2006-11-27 18:29:24 Re: IS it a good practice to use SERIAL as Primary Key?
Previous Message Joshua D. Drake 2006-11-27 18:28:11 Re: PostgreSQL doesn't accept connections when Windows