pgsql: Introduce a registry of built-in shmem subsystems

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Introduce a registry of built-in shmem subsystems
Date: 2026-04-05 23:27:43
Message-ID: E1w9WsZ-00399z-0J@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Introduce a registry of built-in shmem subsystems

To add a new built-in subsystem, add it to subsystemslist.h. That
hooks up its shmem callbacks so that they get called at the right
times during postmaster startup. For now this is unused, but will
replace the current SubsystemShmemSize() and SubsystemShmemInit()
calls in the next commits.

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/1fc2e9fbc0a3d17aa484dbfab11af58eb2cb20ad

Modified Files
--------------
src/backend/bootstrap/bootstrap.c | 2 ++
src/backend/postmaster/launch_backend.c | 2 ++
src/backend/postmaster/postmaster.c | 5 +++++
src/backend/storage/ipc/ipci.c | 21 +++++++++++++++++++++
src/backend/storage/ipc/shmem.c | 6 ++++--
src/backend/tcop/postgres.c | 3 +++
src/include/storage/ipc.h | 1 +
src/include/storage/subsystemlist.h | 23 +++++++++++++++++++++++
src/include/storage/subsystems.h | 30 ++++++++++++++++++++++++++++++
src/tools/pginclude/headerscheck | 1 +
10 files changed, 92 insertions(+), 2 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Heikki Linnakangas 2026-04-05 23:27:44 pgsql: Convert buffer manager to use the new shmem allocation functions
Previous Message Andres Freund 2026-04-05 23:11:55 pgsql: instrumentation: Separate per-node logic from other uses