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: Use PGAlignedXLogBlock for some code simplification
Date: Mon, 08 Dec 2025 14:10:48 +0000
Message-ID: <E1vSbwu-003RV2-1P@gemulon.postgresql.org> (raw)

Use PGAlignedXLogBlock for some code simplification

The code in BootStrapXLOG() and in pg_test_fsync.c tried to align WAL
buffers in complicated ways.  Also, they still used XLOG_BLCKSZ for
the alignment, even though that should now be PG_IO_ALIGN_SIZE.  This
can now be simplified and made more consistent by using
PGAlignedXLogBlock, either directly in BootStrapXLOG() and using
alignas in pg_test_fsync.c.

Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Reviewed-by: Thomas Munro <thomas.munro@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/f462a175-b608-44a1-b428-bdf351e914f4%40eisentraut.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/804046b39a27973751c920f8f41504697f3f52d5

Modified Files
--------------
src/backend/access/transam/xlog.c     | 12 ++++--------
src/bin/pg_test_fsync/pg_test_fsync.c | 11 ++++-------
2 files changed, 8 insertions(+), 15 deletions(-)



Message-ID: <E1vSbwu-003RV2-1P@gemulon.postgresql.org>
Permalink:  ../E1vSbwu-003RV2-1P@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1vSbwu-003RV2-1P@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: Use PGAlignedXLogBlock for some code simplification
  In-Reply-To: <E1vSbwu-003RV2-1P@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