Use PGAlignedXLogBlock for some code simplification
Peter Eisentraut <peter@eisentraut.org>
Author:
Peter Eisentraut <peter@eisentraut.org>
Date: 2025-12-08T13:54:32Z
Releases:
19 (unreleased)
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
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/transam/xlog.c | modified | +4 −8 |
| src/bin/pg_test_fsync/pg_test_fsync.c | modified | +4 −7 |
Discussion
- missing PG_IO_ALIGN_SIZE uses 4 messages · 2025-12-01 → 2025-12-08