Re: AIX support

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Aditya Kamath <Aditya(dot)Kamath1(at)ibm(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-29 23:24:47
Message-ID: aXvsPydAq_DpXDoo@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jan 28, 2026 at 12:33:01PM -0500, Andres Freund wrote:
> Unfortunately I suspect that'll cause issues with make builds, because there
> the files are generated in a different place (src/backend/activity) and then
> only wait_event_types.h is copied to src/include. So including the files as
> utils/ won't work.

Sorry for the crickets and the delay in replying.

> I'd fix that aspect by doing the same thing in the autoconf build as we do in
> meson, i.e. keep the file in the include dir. We already do that e.g. for
> guc_tables.inc.c, see this src/backend/utils/Makefile stanza:
>
> # These generated headers must be symlinked into src/include/.
> # We use header-stamp to record that we've done this because the symlinks
> # themselves may appear older than fmgr-stamp.
> $(top_builddir)/src/include/utils/header-stamp: fmgr-stamp errcodes.h probes.h guc_tables.inc.c
> cd '$(dir $@)' && for file in fmgroids.h fmgrprotos.h errcodes.h probes.h guc_tables.inc.c; do \
> rm -f $$file && $(LN_S) "../../../$(subdir)/$$file" . ; \
> done
> touch $@

Yeah, using this route would be sensible, removing the trick with the
incorrect include dir. Let me a couple of hours to see if I can sort
out a patch..

Should any of these be backpatched, actually? Based on the lack of
complaints, it does not seem so to me, but if we are targetting a
backpatch of the AIX port, that would be required.

> Alternatively: I'm not a fan of including .c files that are not actually
> working C. You could just make wait_event_funcs_data.c be a complete C file,
> defining waitEventData, that is then built as a standalone file.

FWIW, that does not strike me as an issue. We do some of that already
in src/backend/nodes/ for the switch files. It comes down to simpler
scripts generating the code.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2026-01-29 23:41:25 Re: Non-committer reviews: is it helpful?
Previous Message David G. Johnston 2026-01-29 23:19:27 Re: Non-committer reviews: is it helpful?