pgsql: Add alignment option to ShmemRequestStruct()

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add alignment option to ShmemRequestStruct()
Date: 2026-04-05 23:27:44
Message-ID: E1w9WsZ-0039AI-12@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Add alignment option to ShmemRequestStruct()

The buffer blocks, converted to use ShmemRequestStruct() in the next
commit, are IO-aligned. This might come handy in other places too, so
make it an explicit feature of ShmemRequestStruct().

Reviewed-by: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
Reviewed-by: Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>
Reviewed-by: Daniel Gustafsson <daniel(at)yesql(dot)se>
Discussion: https://www.postgresql.org/message-id/CAExHW5vM1bneLYfg0wGeAa=52UiJ3z4vKd3AJ72X8Fw6k3KKrg@mail.gmail.com

Branch
------
master

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

Modified Files
--------------
src/backend/storage/ipc/shmem.c | 39 ++++++++++++++++++++++++++++-----------
src/include/storage/shmem.h | 6 ++++++
2 files changed, 34 insertions(+), 11 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2026-04-05 23:52:37 pgsql: Add tests for lock statistics, take two
Previous Message Heikki Linnakangas 2026-04-05 23:27:43 pgsql: Convert pg_stat_statements to use the new shmem allocation funct