Re: [HACKERS] Problem with listen_addresses = '*' on 8.4beta2 on AIX

2009-06-12 Thread Albe Laurenz
Tom Lane wrote:
 On Thu, Jun 11, 2009 at 9:50 AM, Tom Lane wrote:
 Where are we on this?
 
 waiting on a patch?  Albe? (or should I do it myself?)
 
 I thought the proposed patch was just remove the special case for AIX
 in src/backend/libpq/ip.c.

Yes.

The only bugs at IBM that are listed as open are IZ43766 = IZ44519,
and they should not affect us (I looked through the code).
For the record, these result in ai_socktype and ai_protocol being
set to zero in the result.

All other problems should be fixed in AIX 6.1 ML 02, AIX 5.3 ML 09
and AIX 5.2 ML 09. It's hard to say for AIX 5.1 and AIX 4.3.3 as
they are out of support, and bugs that are fixed in current versions
may be unfixed there. On the other hand, the bugs may have been
introduced later. Thus, for AIX 5.1 and AIX 4.3.3 we should request
that the last Maintenance Level be installed (ML 09 for AIX 5.1
and ML 11 for 4.3.3).

I am waiting for Merlin's report whether getaddrinfo(3) works on his
AIX 4.3.3 after upgrading to ML 11.

I'll attach a small C program I wrote for my convenience to test
different getaddrinfo calls that occur in PostgreSQL code.

After we have word from Merlin, I'd write a patch that changes
src/backend/libpq/ip.c and src/frontend/libpq/ip.c to undo the AIX hack
and adds documentation to section 15.8.1 that states the recommended
fix levels per AIX version.
I won't get to do that before Monday though, so if somebody can do
it before that, go ahead.

Which raises a final question for me:
The documentation mentions support from 4.3 on, and there are specific
comments for 4.3.2.
We can't say anything for versions before 4.3.3, can we?
Should we drop versions  4.3.3 even if Merlin reports success for 4.3.3?

Yours,
Laurenz Albe


test_getaddrinfo.c
Description: test_getaddrinfo.c

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Problem with listen_addresses = '*' on 8.4beta2 on AIX

2009-06-12 Thread Merlin Moncure
On Fri, Jun 12, 2009 at 7:42 AM, Albe Laurenzlaurenz.a...@wien.gv.at wrote:
 Which raises a final question for me:
 The documentation mentions support from 4.3 on, and there are specific
 comments for 4.3.2.
 We can't say anything for versions before 4.3.3, can we?
 Should we drop versions  4.3.3 even if Merlin reports success for 4.3.3?

4.3.3 is working fine.

merlin

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Problem with listen_addresses = '*' on 8.4beta2 on AIX

2009-06-12 Thread Tom Lane
Albe Laurenz laurenz.a...@wien.gv.at writes:
 After we have word from Merlin, I'd write a patch that changes
 src/backend/libpq/ip.c and src/frontend/libpq/ip.c to undo the AIX hack
 and adds documentation to section 15.8.1 that states the recommended
 fix levels per AIX version.
 I won't get to do that before Monday though, so if somebody can do
 it before that, go ahead.

The code change is already made for RC1, but if you want to send in a
patch to improve the docs, feel free.  I left it with just a vague
recommendation to update to the latest fixpack:
http://developer.postgresql.org/pgdocs/postgres/installation-platform-notes.html#INSTALLATION-NOTES-AIX

regards, tom lane

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Problem with listen_addresses = '*' on 8.4beta2 on AIX

2009-06-12 Thread Albe Laurenz
Tom Lane wrote:
 The code change is already made for RC1, but if you want to send in a
 patch to improve the docs, feel free.  I left it with just a vague
 recommendation to update to the latest fixpack:
 http://developer.postgresql.org/pgdocs/postgres/installation-platform-notes.html#INSTALLATION-NOTES-AIX

The attached patch states that we support 4.3.3 to 6.1, removes the
comment for version 4.3.2 and adds a table of minimum recommended fix
levels for AIX.

Use all or parts of it as you think fit.

Yours,
Laurenz Albe


aixdoc.patch
Description: aixdoc.patch

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Problem with listen_addresses = '*' on 8.4beta2 on AIX

2009-06-12 Thread Tom Lane
Albe Laurenz laurenz.a...@wien.gv.at writes:
 The attached patch states that we support 4.3.3 to 6.1, removes the
 comment for version 4.3.2 and adds a table of minimum recommended fix
 levels for AIX.

Applied with a bit of additional wordsmithing.  Thanks!

regards, tom lane

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Problem with listen_addresses = '*' on 8.4beta2 on AIX

2009-06-11 Thread Tom Lane
Merlin Moncure mmonc...@gmail.com writes:
 Albe Laurenz laurenz.a...@wien.gv.at writes:
 Maybe it would be good enough to state that AIX is only supported with
 certain fixpacks installed? And do without all the AIX hacks?

 my take is to go with Albe's solution.  I'm downloading the cumulative
 fixpack for 4.3.3:

 http://www14.software.ibm.com/webapp/set2/sas/f/aix433fixes/ml11package.html

 If the above fixes the problem with the aix hacks removed, problem
 solved.  If it doesn't, then let's face the music and formally drop
 support for aix 4.3 for 8.4.  (and, other than that, do nothing).

Where are we on this?

regards, tom lane

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Problem with listen_addresses = '*' on 8.4beta2 on AIX

2009-06-11 Thread Merlin Moncure
On Thu, Jun 11, 2009 at 9:50 AM, Tom Lanet...@sss.pgh.pa.us wrote:
 Merlin Moncure mmonc...@gmail.com writes:
 Albe Laurenz laurenz.a...@wien.gv.at writes:
 Maybe it would be good enough to state that AIX is only supported with
 certain fixpacks installed? And do without all the AIX hacks?

 my take is to go with Albe's solution.  I'm downloading the cumulative
 fixpack for 4.3.3:

 http://www14.software.ibm.com/webapp/set2/sas/f/aix433fixes/ml11package.html

 If the above fixes the problem with the aix hacks removed, problem
 solved.  If it doesn't, then let's face the music and formally drop
 support for aix 4.3 for 8.4.  (and, other than that, do nothing).

 Where are we on this?

waiting on a patch?  Albe? (or should I do it myself?)

merlin

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Problem with listen_addresses = '*' on 8.4beta2 on AIX

2009-06-11 Thread Tom Lane
Merlin Moncure mmonc...@gmail.com writes:
 On Thu, Jun 11, 2009 at 9:50 AM, Tom Lanet...@sss.pgh.pa.us wrote:
 Where are we on this?

 waiting on a patch?  Albe? (or should I do it myself?)

I thought the proposed patch was just remove the special case for AIX
in src/backend/libpq/ip.c.

regards, tom lane

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Problem with listen_addresses = '*' on 8.4beta2 on AIX

2009-06-10 Thread Albe Laurenz
Tom Lane wrote:
 Drat.  Okay, that easy solution probably won't fly.  Anyone with AIX
 access want to try to develop a patch that covers this case without
 breaking the other ones?

I can try, but I only have AIX 5.3 to test with, so I won't be able
to test for bugs in other versions.

I would need to know what the problems with getaddrinfo on AIX are.
Is this an exhaustive list?
http://archives.postgresql.org/pgsql-hackers/2009-01/msg01705.php
http://archives.postgresql.org/pgsql-hackers/2006-10/msg01069.php
http://archives.postgresql.org/pgsql-general/2006-10/msg00909.php
http://archives.postgresql.org/pgsql-hackers/2004-07/msg01018.php
http://archives.postgresql.org/pgsql-hackers/2004-04/msg00474.php

I'll also try to investigate known bugs in AIX' getaddrinfo.

AIX 4.3 has been out of support for some time - if it makes the
task easier, would it be an option to desupport it?

Yours,
Laurenz Albe

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Problem with listen_addresses = '*' on 8.4beta2 on AIX

2009-06-10 Thread Merlin Moncure
On Wed, Jun 10, 2009 at 3:38 AM, Albe Laurenzlaurenz.a...@wien.gv.at wrote:
 Tom Lane wrote:
 Drat.  Okay, that easy solution probably won't fly.  Anyone with AIX
 access want to try to develop a patch that covers this case without
 breaking the other ones?

 I can try, but I only have AIX 5.3 to test with, so I won't be able
 to test for bugs in other versions.

 I would need to know what the problems with getaddrinfo on AIX are.
 Is this an exhaustive list?
 http://archives.postgresql.org/pgsql-hackers/2009-01/msg01705.php
 http://archives.postgresql.org/pgsql-hackers/2006-10/msg01069.php
 http://archives.postgresql.org/pgsql-general/2006-10/msg00909.php
 http://archives.postgresql.org/pgsql-hackers/2004-07/msg01018.php
 http://archives.postgresql.org/pgsql-hackers/2004-04/msg00474.php

 I'll also try to investigate known bugs in AIX' getaddrinfo.

 AIX 4.3 has been out of support for some time - if it makes the
 task easier, would it be an option to desupport it?

We have 4.3 and a 6.0 here.  4.3 is pretty old, I don't think it's a
big deal if we can't get it to work, as long as libpq works.

merlin

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Problem with listen_addresses = '*' on 8.4beta2 on AIX

2009-06-10 Thread Albe Laurenz
Merlin Moncure wrote:
 I wrote:
 I can try, but I only have AIX 5.3 to test with, so I won't be able
 to test for bugs in other versions.

 I would need to know what the problems with getaddrinfo on AIX are.

 I'll also try to investigate known bugs in AIX' getaddrinfo.

 AIX 4.3 has been out of support for some time - if it makes the
 task easier, would it be an option to desupport it?
 
 We have 4.3 and a 6.0 here.  4.3 is pretty old, I don't think it's a
 big deal if we can't get it to work, as long as libpq works.

Ok, I did a bit of research here.

First, the only cases that affect us are the following:

a) listen_addresses = '*'
   Then the hostname argument to getaddrinfo will be NULL, and
   the servname argument will be 5432 or similar.

b) listen_addresses = ''
   This does not affect us, since it will not call getaddrinfo.

c) listen_addresses = 'host1[,...]'
   Then the hostname argument will be host1 (DNS name or IPv4/6
   address), and servname will be 5432 or similar.

Moreover, in the struct addrinfo hint, the following will be set:
   ai_flags = AI_PASSIVE
   ai_family = AF_UNSPEC
   ai_socktype = SOCK_STREAM
and all other hints will be zero.

Did I cover all cases?

I tested getaddrinfo() on my AIX 5.3 ML 03 with these cases,
and I did not encounter any problems and the result looked right.

I searched the bug database at IBM, and the only APARs that looked
like they might affect us are:

IY40908, IY45130 = IY44782, IY47326 = IY46612 = IY48232, IY46023,
IY51966 = IY50970, IY54776, IZ00799 and IY86414 = IY86549.


Since it works on my system, I wonder if the machines where it fails did
not have any fixpacks installed.

Does Andrew Chernow's machine have the terminal fixpack installed?
I wonder what problem he encountered when he said the service argument
to getaddrinfo is busted on AIX 4.3.

Maybe it would be good enough to state that AIX is only supported with
certain fixpacks installed? And do without all the AIX hacks?

Yours,
Laurenz Albe

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Problem with listen_addresses = '*' on 8.4beta2 on AIX

2009-06-10 Thread Tom Lane
Albe Laurenz laurenz.a...@wien.gv.at writes:
 Maybe it would be good enough to state that AIX is only supported with
 certain fixpacks installed? And do without all the AIX hacks?

That would definitely be a good-enough solution in my opinion,
as long as we can document which fixes are needed for which releases.

regards, tom lane

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Problem with listen_addresses = '*' on 8.4beta2 on AIX

2009-06-10 Thread Merlin Moncure
On Wed, Jun 10, 2009 at 12:13 PM, Tom Lanet...@sss.pgh.pa.us wrote:
 Albe Laurenz laurenz.a...@wien.gv.at writes:
 Maybe it would be good enough to state that AIX is only supported with
 certain fixpacks installed? And do without all the AIX hacks?

 That would definitely be a good-enough solution in my opinion,
 as long as we can document which fixes are needed for which releases.

my take is to go with Albe's solution.  I'm downloading the cumulative
fixpack for 4.3.3:

http://www14.software.ibm.com/webapp/set2/sas/f/aix433fixes/ml11package.html

If the above fixes the problem with the aix hacks removed, problem
solved.  If it doesn't, then let's face the music and formally drop
support for aix 4.3 for 8.4.  (and, other than that, do nothing).

merlin

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Problem with listen_addresses = '*' on 8.4beta2 on AIX

2009-06-10 Thread Andrew Dunstan



Merlin Moncure wrote:

On Wed, Jun 10, 2009 at 12:13 PM, Tom Lanet...@sss.pgh.pa.us wrote:
  

Albe Laurenz laurenz.a...@wien.gv.at writes:


Maybe it would be good enough to state that AIX is only supported with
certain fixpacks installed? And do without all the AIX hacks?
  

That would definitely be a good-enough solution in my opinion,
as long as we can document which fixes are needed for which releases.



my take is to go with Albe's solution.  I'm downloading the cumulative
fixpack for 4.3.3:

http://www14.software.ibm.com/webapp/set2/sas/f/aix433fixes/ml11package.html

If the above fixes the problem with the aix hacks removed, problem
solved.  If it doesn't, then let's face the music and formally drop
support for aix 4.3 for 8.4.  (and, other than that, do nothing).
  


You mean nothing other than removing the AIX hacks?

(I'm with Tom. This has been a constant annoyance over quite a few years.)


cheers

andrew

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Problem with listen_addresses = '*' on 8.4beta2 on AIX

2009-06-09 Thread Tom Lane
Albe Laurenz laurenz.a...@wien.gv.at writes:
 Building 8.4beta2 on my AIX test machine works fine,
 but when I set listen_addresses = '*' in postgresql.conf,
 the server fails to start.

I grow weary of AIX's seemingly-unlimited supply of getaddrinfo
peculiarities.  What about forgetting the whole matter and always
using our src/port/ implementation on that OS?

regards, tom lane

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Problem with listen_addresses = '*' on 8.4beta2 on AIX

2009-06-09 Thread Andrew Dunstan



Tom Lane wrote:

Albe Laurenz laurenz.a...@wien.gv.at writes:
  

Building 8.4beta2 on my AIX test machine works fine,
but when I set listen_addresses = '*' in postgresql.conf,
the server fails to start.



I grow weary of AIX's seemingly-unlimited supply of getaddrinfo
peculiarities.  What about forgetting the whole matter and always
using our src/port/ implementation on that OS?


  


I'm assuming that the OP has tested that 8.3 works on the same machine 
with listen_addresses = '*'.


If so, then this seems a reasonable suggestion.

cheers

andrew

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Problem with listen_addresses = '*' on 8.4beta2 on AIX

2009-06-09 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes:
 Tom Lane wrote:
 I grow weary of AIX's seemingly-unlimited supply of getaddrinfo
 peculiarities.  What about forgetting the whole matter and always
 using our src/port/ implementation on that OS?

 I'm assuming that the OP has tested that 8.3 works on the same machine 
 with listen_addresses = '*'.
 If so, then this seems a reasonable suggestion.

The only serious knock I can see on our implementation is that it lacks
IPv6 support.  So we'd not want to use it on AIX versions that are
IPv6-capable.  Which are those, if any, and do they have any of these
getaddrinfo issues?

regards, tom lane

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Problem with listen_addresses = '*' on 8.4beta2 on AIX

2009-06-09 Thread Merlin Moncure
On Tue, Jun 9, 2009 at 5:24 PM, Tom Lanet...@sss.pgh.pa.us wrote:
 Andrew Dunstan and...@dunslane.net writes:
 Tom Lane wrote:
 I grow weary of AIX's seemingly-unlimited supply of getaddrinfo
 peculiarities.  What about forgetting the whole matter and always
 using our src/port/ implementation on that OS?

 I'm assuming that the OP has tested that 8.3 works on the same machine
 with listen_addresses = '*'.
 If so, then this seems a reasonable suggestion.

 The only serious knock I can see on our implementation is that it lacks
 IPv6 support.  So we'd not want to use it on AIX versions that are
 IPv6-capable.  Which are those, if any, and do they have any of these
 getaddrinfo issues?

actually, aix was the first commercial unix distribution to support
ipv6 afaik...as of 4.3 iirc.

merlin

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Problem with listen_addresses = '*' on 8.4beta2 on AIX

2009-06-09 Thread Tom Lane
Merlin Moncure mmonc...@gmail.com writes:
 Tom Lane wrote:
 The only serious knock I can see on our implementation is that it lacks
 IPv6 support.  So we'd not want to use it on AIX versions that are
 IPv6-capable.  Which are those, if any, and do they have any of these
 getaddrinfo issues?

 actually, aix was the first commercial unix distribution to support
 ipv6 afaik...as of 4.3 iirc.

Drat.  Okay, that easy solution probably won't fly.  Anyone with AIX
access want to try to develop a patch that covers this case without
breaking the other ones?

regards, tom lane

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers