public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: Srirama Kucherlapati <[email protected]>
Cc: Peter Eisentraut <[email protected]>
Cc: [email protected] <[email protected]>
Cc: Heikki Linnakangas <[email protected]>
Cc: Tristan Partin <[email protected]>
Cc: AIX PG user <[email protected]>
Subject: Re: AIX support
Date: Tue, 27 Jan 2026 16:42:35 -0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <CY5PR11MB63928CC05906F27FB10D74D0FD322@CY5PR11MB6392.namprd11.prod.outlook.com>
<SJ4PPFB817783263EA0FD91EBC346308C51DBA3A@SJ4PPFB81778326.namprd15.prod.outlook.com>
<[email protected]>
<SJ4PPFB817783267BD66F22BFC328D93F81DBA8A@SJ4PPFB81778326.namprd15.prod.outlook.com>
<[email protected]>
<SJ4PPFB8177832684055FA99E25A710A09BDBB2A@SJ4PPFB81778326.namprd15.prod.outlook.com>
<SJ4PPFB817783265975DE0984EE26A94891DBBBA@SJ4PPFB81778326.namprd15.prod.outlook.com>
<SJ4PPFB817783261597674B9814FE523944DB8EA@SJ4PPFB81778326.namprd15.prod.outlook.com>
<[email protected]>
<SJ4PPFB8177832645802E05CC9DD299E792DB8CA@SJ4PPFB81778326.namprd15.prod.outlook.com>
<[email protected]>
<SJ4PPFB81778326E995FAD5945ECF752FA1DB96A@SJ4PPFB81778326.namprd15.prod.outlook.com>
<SJ4PPFB81778326EC35CBFA16B5449CFA97DB94A@SJ4PPFB81778326.namprd15.prod.outlook.com>
<f6c4e700-73b9-! ! ! [email protected]>
<[email protected]>
<SJ4PPFB81778326F736E5A6522BE070E80EDB90A@SJ4PPFB81778326.namprd15.prod.outlook.com>
<[email protected]>
... btw, I was annoyed to notice that AIX still does this in
64-bit builds:
checking size of void *... 8
checking size of size_t... 8
checking size of long... 8
checking size of long long... 8
checking size of intmax_t... 8
checking alignment of short... 2
checking alignment of int... 4
checking alignment of long... 8
checking alignment of int64_t... 8
checking alignment of double... 4
Normally we reject alignof(double) < alignof(int64), for the reasons
explained in configure.ac:
# We require 'double' to have the strictest alignment among the basic types,
# because otherwise the C ABI might impose 8-byte alignment on some of the
# other C types that correspond to TYPALIGN_DOUBLE SQL types. That could
# cause a mismatch between the tuple layout and the C struct layout of a
# catalog tuple. We used to carefully order catalog columns such that any
# fixed-width, attalign=4 columns were at offsets divisible by 8 regardless
# of MAXIMUM_ALIGNOF to avoid that, but we no longer support any platforms
# where TYPALIGN_DOUBLE != MAXIMUM_ALIGNOF.
I see that your patch summarily overrides that restriction (without
bothering to touch this comment), but I fear that the chances of
that being acceptable as-is are zero. We're not going to go back to
having to count bytes every time we change a system catalog rowtype
that involves an 'int8' or 'float8' column.
I think the only way we could deal with this in a maintainable
fashion would be to remove the assumption that int64 and double
have the same alignment requirement. That is tech debt that
we really should have cleaned up years ago anyway. The main
thing that's discouraged people from pursuing it is the fear
of adding overhead to tuple assembly/disassembly loops. But
I think maybe we could avoid adding such overhead by mapping
two different type alignment symbols at the source-code level
into appropriate values at runtime. Or a bunch of conditional
compilation, or whatever. Any modern machine is going to have
to be able to deal with both 4-byte and 8-byte alignment
requirements, it's just a question of which datatypes have
which requirement.
While I don't foresee that being an enormous patch, it's not trivial
either. I'd encourage you to write and submit it as a separate patch
rather than something directly tied to the AIX-restoration patch.
regards, tom lane
view thread (51+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: AIX support
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox