public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tom Lane <[email protected]>
To: Peter Eisentraut <[email protected]>
Cc: pgsql-hackers <[email protected]>
Cc: Thomas Munro <[email protected]>
Subject: Re: Move MAXIMUM_ALIGNOF definition to c.h
Date: Thu, 19 Feb 2026 19:23:44 -0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

Peter Eisentraut <[email protected]> writes:
> As suggested at [0], we can move the computation of MAXIMUM_ALIGNOF from 
> configure.ac and meson.build to c.h.  This eliminates code duplication. 
> (For example, the AIX patch contemplates some changes, so it would be 
> good to make those in only one place.)

I looked at this but am pretty underwhelmed.  Yes, it replaces two
copies of that logic with one, but said logic is so trivial that
that's not a big win.  Moreover, I'm finding it hard to believe
that we'll ever need to change that logic again --- the plain
max-of-two-alignment-measurements logic is the way it had been
for a long time and will be again after the AIX patch lands.  I can't
foresee a future platform where it'd need to be any different.

In exchange for that simplification, we are taking a computation
that currently is done once per configure/meson-setup step, and
instead computing it during each .c file build.  I imagine that
at least the autoconf implementation is more expensive than
what the C compiler would need to do, but repeating it over and
over again will surely end up costing more.

So this doesn't seem like a good change to me.

			regards, tom lane






view thread (3+ messages)

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]
  Subject: Re: Move MAXIMUM_ALIGNOF definition to c.h
  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