Re: Decoupling our alignment assumptions about int64 and double

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Aditya Kamath <Aditya.Kamath1@ibm.com>
Cc: Thomas Munro <thomas.munro@gmail.com>, Andres Freund <andres@anarazel.de>, "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>, Srirama Kucherlapati <sriram.rk@in.ibm.com>, AIX PG user <postgres-ibm-aix@wwpdl.vnet.ibm.com>
Date: 2026-02-10T20:52:18Z
Lists: pgsql-hackers

Attachments

Aditya Kamath <Aditya.Kamath1@ibm.com> writes:
> We built the master branch with this POC patch plus meson and GNU build development patches for AIX.
> We tested this in our AIX environment using DOUBLE PRECISION and BIGINT columns to verify that pg_upgrade succeeds. We first created a PostgreSQL 15 database cluster, populated it with sample records, and then upgraded it to a master-branch build that includes this patch. The upgrade completed successfully.

Cool, thanks for testing.

Here's a fleshed-out version of that patch.  I propagated the
BEGIN/END_CATALOG_STRUCT macros into all the catalog headers
and removed the for-test-purposes-only column rearrangement in
pg_subscription.h.  I also elected to use the push/pop variants of the
pack pragma.  This makes no difference today, since we're not using
that pragma elsewhere, but conceivably it'll make this easier to work
with in future.  It's otherwise the same except for a bit more
comment-smithing.

			regards, tom lane

Commits

  1. Cope with AIX's alignment woes by using _Pragma("pack").

  2. Make some minor cleanups in typalign-related code.

  3. Refactor att_align_nominal() to improve performance.