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
- v5-0001-Cope-with-AIX-s-alignment-woes-by-using-_Pragma-p.patch (text/x-diff) patch v5-0001
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
-
Cope with AIX's alignment woes by using _Pragma("pack").
- ecae09725236 19 (unreleased) landed
-
Make some minor cleanups in typalign-related code.
- 7cdb633c89da 19 (unreleased) landed
-
Refactor att_align_nominal() to improve performance.
- da7a1dc0d62a 19 (unreleased) landed