RE: AIX support

From: Aditya Kamath <Aditya(dot)Kamath1(at)ibm(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Robert Haas <robertmhaas(at)gmail(dot)com>, Srirama Kucherlapati <sriram(dot)rk(at)in(dot)ibm(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-01-30 11:41:51
Message-ID: LV8PR15MB64884CAAB8F55954EA52E85AD69FA@LV8PR15MB6488.namprd15.prod.outlook.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Michael, Andres, Robert, Peter, Tom and community members,

>Three paths in wait_event_names.txt were also inconsistent. It is
>worth noting that the sgml path is entirely wrong, this is generated
>in doc/src/sgml/.

> Comments and thoughts are welcome.

Thanks Michael for this patch. — we applied it on my AIX setup and can confirm that it works correctly here. The include‑path issue is resolved with the changes.

We’ve taken your patch along with the maintainers earlier suggestions and combined them into a single, consolidated Meson patch that aligns with the Autoconf build layout. This version can serve as the first patch to land for enabling PostgreSQL to build via Meson on AIX.

One can git apply the attachment ( See: 0001-Add-AIX-support-for-Postgresql-using-meson-build-too.patch) to the master branch of Postgres. Have also summarised all the topics discussed so far in the commit message with the links and build instructions.

The default compilation mode in AIX is 32 bit even today. So, the ar command triggeried via meson in AIX to archive shared libraries will need the OBJECT_MODE set to 64 which is the only flag we need to set. Rest will all come via the build.

This patch covers only the Meson build system. We will handle the GNU configure/make changes for AIX in a separate thread, since there is already ongoing discussion on that front.

The patch incorporates all the points discussed, including:

1. Supporting only 64‑bit builds on AIX

2. Allowing both static and shared builds, with AIX using shared libraries

3. Including Tom’s fix for the max‑alignment issue

4. The usage of scripts for their respective purposes

5. Fixing the header include‑path issue we have been discussing

Thank you everyone for your support and guidance so far — much appreciated. Kindly review and let me know if anything further is needed.

References to prior discussion threads:

[0] https://www.postgresql.org/message-id/e8aa97db-872b-4087-b073-f296baae948d@eisentraut.org

[1] https://www.postgresql.org/message-id/1127261.1769649624%40sss.pgh.pa.us

[2] https://www.postgresql.org/message-id/vua2n6svb6fac3fmz42ahqxndmgbgor7vpxtemis5evasfpzb3@ogs4ewexkpjm

Kindly review the patch and let me know if there is any adjustments needed or if we missed something.

Once again thank you all for the effort, discussions and guidance given.

Have a nice day ahead.

Best regards,

Aditya.

On 30/01/26, 10:36 AM, "Michael Paquier" <michael(at)paquier(dot)xyz> wrote:

On Fri, Jan 30, 2026 at 01:38:42PM +0900, Michael Paquier wrote:
> While looking at the whole object dependency tree in the builds, I
> have settled down to a reuse of the same logic as guc_tables.inc.c for
> configure/make, by pushing down one level the generation of the three
> wait event files. These are not anymore saved in
> src/backend/utils/activity/, just src/backend/utils/, including them
> under header-stamp. Building directly in src/backend/utils/activity/
> also works, with two rules in src/backend/utils/activity/Makefile to
> force a rebuild. The files are then included as if they were in
> include/utils/, with the generation of links from src/backend/utils/
> to src/include/utils/, just like guc_tables.inc.c. That's the least
> invasive method I could come up with.
>
> I have run out of tokens for the CI this month, so I have not been
> able to check it there. My manual tests across all three build
> methods are working.

Scratch that a bit.. Some grepping is pointing out that
generated_sources_ac would become incorrect in
src/include/utils/meson.build.

Three paths in wait_event_names.txt were also inconsistent. It is
worth noting that the sgml path is entirely wrong, this is generated
in doc/src/sgml/.

Comments and thoughts are welcome.
--
Michael

Attachment Content-Type Size
0001-Add-AIX-support-for-Postgresql-using-meson-build-too.patch application/octet-stream 76.3 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Jones 2026-01-30 11:57:47 Re: Change default of jit to off
Previous Message Dean Rasheed 2026-01-30 11:36:42 Re: ABI Compliance Checker GSoC Project