Re: AIX support

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Srirama Kucherlapati <sriram(dot)rk(at)in(dot)ibm(dot)com>
Cc: Aditya Kamath <Aditya(dot)Kamath1(at)ibm(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Noah Misch <noah(at)leadboat(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Robert Haas <robertmhaas(at)gmail(dot)com>, "peter(at)eisentraut(dot)org" <peter(at)eisentraut(dot)org>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, "hlinnaka(at)iki(dot)fi" <hlinnaka(at)iki(dot)fi>, "tristan(at)partin(dot)io" <tristan(at)partin(dot)io>, "postgres-ibm-aix(at)wwpdl(dot)vnet(dot)ibm(dot)com" <postgres-ibm-aix(at)wwpdl(dot)vnet(dot)ibm(dot)com>
Subject: Re: AIX support
Date: 2026-02-15 23:34:44
Message-ID: 975129.1771198484@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I have spent some time going through this patchset in detail,
and have refactored it in a way that I hope makes it easier
to review. I could use some review of the meson bits, because
I'm still pretty unfamiliar with that tool.

0001 is the same patch I posted before to solve the alignment
issue by using _Pragma(pack).

0002 is as close as I could get to a straight revert of the
AIX-support-removal commits 0b16bb877 and e6bb491bf. I did
not put back the bits concerned with xlc support, since we're
tossing that overboard. I also didn't put back the changes
in maxalign computation (mooted by 0001), nor the regression
test for catalog column alignment (ditto), nor the changes in
s_lock.h (unnecessary after 0c9f46c42).

0003 through 0005 are changes needed on top of that, mostly
borrowed from your patches although I corrected a few things.
I think these are small enough bites to be easily reviewable.

0006 adds some definitions I found necessary to get a warning-free
compile.

0007 arose from comparing the file sets installed by the autoconf
build vs. the meson build and making the latter match the former.
At least the first couple of changes in this seem to be bugs that
were there before we removed AIX support.

Barring suggestions about how to do the meson code better,
I think this is close to committable. The loose ends that
I know about are:

* The autoconf build produces warnings about TOC overflow
while linking the backend, as I showed upthread. I don't
understand why -Wl,-bbigtoc doesn't silence that, especially
since no such warnings appear in the meson build. (Meson
seems to be injecting -Wl,-bbigtoc of its own accord, but
there must be some additional special thing it's doing.)
The executable works fine, so it's not critical, but
why the warning?

* The meson build, but not the autoconf build, produces
complaints about

../src/common/pg_get_line.c: In function 'pg_get_line_append':
../src/common/pg_get_line.c:129:27: warning: '({anonymous})' may be used uninitialized [-Wmaybe-uninitialized]
129 | if (prompt_ctx && sigsetjmp(*((sigjmp_buf *) prompt_ctx->jmpbuf), 1) != 0)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I'm not so worried about the warning itself --- buildfarm member
hake has also been showing this --- but why are the two builds
different? Same compiler, pretty much the same switches, although
I see Meson is injecting -pthread without being asked. Could that
be responsible?

* plpython probably needs work, and I'm not sure about --with-llvm.
I can't really test either of those for lack of installed packages.
(Curiously, p9-aix1-postgres1 does seem to have a python installation
in /opt/freeware, but it's incomplete: there's no Python.h anywhere.)

BTW, who should the commit message(s) list as authors on these
patches, besides the two of you?

regards, tom lane

Attachment Content-Type Size
v6-0001-Cope-with-AIX-s-alignment-woes-by-using-_Pragma-p.patch text/x-diff 61.5 KB
v6-0002-Revert-removal-of-AIX-support.patch text/x-diff 27.7 KB
v6-0003-Various-minor-adjustments-for-AIX.patch text/x-diff 5.3 KB
v6-0004-Teach-meson-build-infrastructure-not-to-build-sta.patch text/x-diff 7.7 KB
v6-0005-Force-64-bit-builds-on-AIX.patch text/x-diff 9.5 KB
v6-0006-Add-some-definitions-needed-for-a-clean-compile.patch text/x-diff 2.0 KB
v6-0007-Fix-inconsistencies-in-the-set-of-installed-files.patch text/x-diff 4.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Chao Li 2026-02-15 23:39:09 Re: Fix uninitialized xl_running_xacts padding
Previous Message Chao Li 2026-02-15 23:19:05 Re: pgstat include expansion