pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: C11 alignas instead of unions -- extended alignments
Date: Mon, 24 Nov 2025 06:54:37 +0000
Message-ID: <E1vNQT7-0017ey-17@gemulon.postgresql.org> (raw)

C11 alignas instead of unions -- extended alignments

This replaces some uses of pg_attribute_aligned() with the standard
alignas() for cases where extended alignment (larger than max_align_t)
is required.

This patch stipulates that all supported compilers must support
alignments up to PG_IO_ALIGN_SIZE, but that seems pretty likely.

We can then also desupport the case where direct I/O is disabled
because pg_attribute_aligned is not supported.

Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/46f05236-d4d4-4b4e-84d4-faa500f14691%40eisentraut.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/d4c0f91f7d57066b9d62c0eccb2a913d40c14066

Modified Files
--------------
src/include/c.h          | 18 ++++--------------
src/include/storage/fd.h |  5 ++---
2 files changed, 6 insertions(+), 17 deletions(-)



Message-ID: <E1vNQT7-0017ey-17@gemulon.postgresql.org>
Permalink:  ../E1vNQT7-0017ey-17@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1vNQT7-0017ey-17@gemulon.postgresql.org

 · 

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: pgsql-committers@postgresql.org
  Cc: peter@eisentraut.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: C11 alignas instead of unions -- extended alignments
  In-Reply-To: <E1vNQT7-0017ey-17@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox