Re: AIX and getaddrinfo - Mailing list pgsql-general

From Chris Browne
Subject Re: AIX and getaddrinfo
Date
Msg-id 60zmab8l77.fsf@dba2.int.libertyrms.com
Whole thread Raw
In response to Upgrade problem  (Bill Kurland <bill@panix.com>)
List pgsql-general
bill@panix.com (Bill Kurland) writes:
> Chris Browne wrote:
>> tgl@sss.pgh.pa.us (Tom Lane) writes:
>>
>>> Bill Kurland <bill@shakespeare-nyc.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.
>>>
>>
>> That doesn't make a lot of sense to me...
>>
>> It is fair to say that AIX does include a PostgreSQL entry, by
>> default:
>>
>> pgorg@nj-570-db4011:/opt/home/pgorg $ grep 5432 /etc/services
>> postgresql              5432/tcp                # PostgreSQL Database
>> postgresql              5432/udp                # PostgreSQL Database
>>
>> [We didn't add these entries ourselves; they were there by default.]
>>
> Odd. I checked 4 different AIX 4.3 machines and none of them have
> postgresql entries. I don't have
> any AIX 5 boxes. Is that what you are running?

Yup, we're running 5.3.  I don't think we have any 5.1 boxes left to
look at.

You might also look for port 3306; we've got MySQL listed as
associated with that port.  I suspect AIX 4.3 doesn't include that
either.

I'd be very unkeen on continuing to run 4.anything; we had a nasty
surprise this spring when we discovered that 5.1 was falling out of
service shortly before we were to migrate databases to 5.3.

>> But most of our database backends run on ports other than 5432, and I
>> haven't noticed anything that seems to tie to that.  We have had
>> difficulties with getaddrinfo(), but I don't think there's anything
>> that hasn't either been resolved in modern PG releases or listed in
>> FAQ_AIX.

> I just reread the FAQ_AIX doc for 8.1.5 and I couldn't find any
> reference to getaddrinfo. What difficulties have you seen and under
> which AIX ?

It has always turned into patches.  For 7.4, we needed to apply a
patch to turn parts of the IPv6 functionality off, otherwise we had
intermittent SIG 11 problems.  Nothing directly FAQ-worthy; it was
code that got added into later versions.
--
let name="cbbrowne" and tld="linuxfinances.info" in String.concat "@" [name;tld];;
http://linuxdatabases.info/info/advocacy.html
Oh,  boy, virtual memory!  Now I'm  gonna make  myself a  really *big*
RAMdisk!

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: How to implement backup protocol
Next
From: Tony Caduto
Date:
Subject: Re: Only MONO/WinForms is a way to go