Unix Technical Forum

AIX FAQ Updates

This is a discussion on AIX FAQ Updates within the Pgsql Patches forums, part of the PostgreSQL category; --> I believe this change will apply equally to 7.4, 8.0, and CVS HEAD. Index: FAQ_AIX ================================================== ================= RCS file: ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql Patches

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-18-2008, 12:41 AM
Chris Browne
 
Posts: n/a
Default AIX FAQ Updates

I believe this change will apply equally to 7.4, 8.0, and CVS HEAD.

Index: FAQ_AIX
================================================== =================
RCS file: /projects/cvsroot/pgsql/doc/FAQ_AIX,v
retrieving revision 1.11
diff -c -u -r1.11 FAQ_AIX
--- FAQ_AIX 12 Nov 2002 20:02:32 -0000 1.11
+++ FAQ_AIX 15 Jul 2005 15:51:10 -0000
@@ -18,3 +18,79 @@
You need libm.a that is in the fileset bos.adt.libm. (Try the
following command.)
$ lslpp -l bos.adt.libm
+
+
+---
+From: Christopher Browne <cbbrowne@ca.afilias.info>
+Date: 2005-07-15
+
+On AIX 5.3, there have been some problems getting PostgreSQL to
+compile and run using GCC.
+
+1. You will want to use a version of GCC subsequent to 3.3.2,
+ particularly if you use a prepackaged version. We had good
+ success with 4.0.1.
+
+ Problems with earlier versions seem to have more to do with the
+ way IBM packaged GCC than with actual issues with GCC, so that if
+ you compile GCC yourself, you might well have success with an
+ earlier version of GCC.
+
+2. AIX 5.3 has a problem where sockadr_storage is not defined to be
+ large enough. In version 5.3, IBM increased the size of
+ sockaddr_un, the address structure for UNIX Domain Sockets, but
+ did not correspondingly increase the size of sockadr_storage.
+
+ The result of this is that attempts to use UDS with PostgreSQL
+ lead to libpq overflowing the data structure. TCP/IP connections
+ work OK, but not UDS, which prevents the regression tests from
+ working.
+
+ The nonconformance may be readily demonstrated by compiling and
+ running the following C program which calculates and compares the
+ sizes of the various structures:
+
+test_size.c
+------------
+
+---------- snip here - test_size.c ----------------------------
+#include <stdio.h>
+#include <sys/un.h>
+#include <sys/socket.h>
+int main (int argc, char *argv[]) {
+ struct sockaddr_storage a;
+ struct sockaddr_un b;
+ printf("Size of sockadr_storage: %d\n", sizeof(a));
+ printf ("Size of sockaddr_un:%d\n", sizeof(b));
+
+ if (sizeof(a) >= sizeof(b))
+ printf ("Conformant to RFC 3493\n");
+ else
+ printf ("Non-conformant to RFC 3493\n");
+}
+---------- snip here - test_size.c ----------------------------
+
+
+The problem was reported to IBM, and is recorded as bug report
+PMR29657.
+
+An immediate resolution is to alter _SS_MAXSIZE to = 1025 in
+/usr/include/sys/socket.h, which will resolve the immediate problem.
+
+It appears that the "final" resolution will be to alter _SS_MAXSIZE to
+1280, making the size nicely align with page boundaries.
+
+IBM will be providing a fix in the next maintenance release (expected
+in October 2005) with an updated socket.h.
+---
+From: Christopher Browne <cbbrowne@ca.afilias.info>
+Date: 2005-07-15
+
+Some of the AIX tools may be "a little different" from what you may be
+accustomed to on other platforms. If you are looking for a version of
+ldd, useful for determining what object code depends on what
+libraries, the following URLs may help you...
+
+http://www.faqs.org/faqs/aix-faq/part4/section-22.html
+
+http://www.han.de/~jum/aix/ldd.c
\ No newline at end of file

--
(format nil "~S@~S" "cbbrowne" "acm.org")
http://www.ntlug.org/~cbbrowne/sap.html
Rules of the Evil Overlord #78. "I will not tell my Legions of Terror
"And he must be taken alive!" The command will be: ``And try to take
him alive if it is reasonably practical.''"
<http://www.eviloverlord.com/>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-18-2008, 12:45 AM
Bruce Momjian
 
Posts: n/a
Default Re: AIX FAQ Updates


Patch applied to 8.0.X and HEAD. Thanks.

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



Chris Browne wrote:
> I believe this change will apply equally to 7.4, 8.0, and CVS HEAD.
>
> Index: FAQ_AIX
> ================================================== =================
> RCS file: /projects/cvsroot/pgsql/doc/FAQ_AIX,v
> retrieving revision 1.11
> diff -c -u -r1.11 FAQ_AIX
> --- FAQ_AIX 12 Nov 2002 20:02:32 -0000 1.11
> +++ FAQ_AIX 15 Jul 2005 15:51:10 -0000
> @@ -18,3 +18,79 @@
> You need libm.a that is in the fileset bos.adt.libm. (Try the
> following command.)
> $ lslpp -l bos.adt.libm
> +
> +
> +---
> +From: Christopher Browne <cbbrowne@ca.afilias.info>
> +Date: 2005-07-15
> +
> +On AIX 5.3, there have been some problems getting PostgreSQL to
> +compile and run using GCC.
> +
> +1. You will want to use a version of GCC subsequent to 3.3.2,
> + particularly if you use a prepackaged version. We had good
> + success with 4.0.1.
> +
> + Problems with earlier versions seem to have more to do with the
> + way IBM packaged GCC than with actual issues with GCC, so that if
> + you compile GCC yourself, you might well have success with an
> + earlier version of GCC.
> +
> +2. AIX 5.3 has a problem where sockadr_storage is not defined to be
> + large enough. In version 5.3, IBM increased the size of
> + sockaddr_un, the address structure for UNIX Domain Sockets, but
> + did not correspondingly increase the size of sockadr_storage.
> +
> + The result of this is that attempts to use UDS with PostgreSQL
> + lead to libpq overflowing the data structure. TCP/IP connections
> + work OK, but not UDS, which prevents the regression tests from
> + working.
> +
> + The nonconformance may be readily demonstrated by compiling and
> + running the following C program which calculates and compares the
> + sizes of the various structures:
> +
> +test_size.c
> +------------
> +
> +---------- snip here - test_size.c ----------------------------
> +#include <stdio.h>
> +#include <sys/un.h>
> +#include <sys/socket.h>
> +int main (int argc, char *argv[]) {
> + struct sockaddr_storage a;
> + struct sockaddr_un b;
> + printf("Size of sockadr_storage: %d\n", sizeof(a));
> + printf ("Size of sockaddr_un:%d\n", sizeof(b));
> +
> + if (sizeof(a) >= sizeof(b))
> + printf ("Conformant to RFC 3493\n");
> + else
> + printf ("Non-conformant to RFC 3493\n");
> +}
> +---------- snip here - test_size.c ----------------------------
> +
> +
> +The problem was reported to IBM, and is recorded as bug report
> +PMR29657.
> +
> +An immediate resolution is to alter _SS_MAXSIZE to = 1025 in
> +/usr/include/sys/socket.h, which will resolve the immediate problem.
> +
> +It appears that the "final" resolution will be to alter _SS_MAXSIZE to
> +1280, making the size nicely align with page boundaries.
> +
> +IBM will be providing a fix in the next maintenance release (expected
> +in October 2005) with an updated socket.h.
> +---
> +From: Christopher Browne <cbbrowne@ca.afilias.info>
> +Date: 2005-07-15
> +
> +Some of the AIX tools may be "a little different" from what you may be
> +accustomed to on other platforms. If you are looking for a version of
> +ldd, useful for determining what object code depends on what
> +libraries, the following URLs may help you...
> +
> +http://www.faqs.org/faqs/aix-faq/part4/section-22.html
> +
> +http://www.han.de/~jum/aix/ldd.c
> \ No newline at end of file
>
> --
> (format nil "~S@~S" "cbbrowne" "acm.org")
> http://www.ntlug.org/~cbbrowne/sap.html
> Rules of the Evil Overlord #78. "I will not tell my Legions of Terror
> "And he must be taken alive!" The command will be: ``And try to take
> him alive if it is reasonably practical.''"
> <http://www.eviloverlord.com/>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq
>


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

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:11 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com