postgresql/src/backend
Heikki Linnakangas 283e823f9d Introduce a new mechanism for registering shared memory areas
This replaces the [Subsystem]ShmemSize() and [Subsystem]ShmemInit()
functions called at postmaster startup with a new set of callbacks.
The new mechanism is designed to be more ergonomic. Notably, the size
of each shmem area is specified in the same ShmemRequestStruct() call,
together with its name. The same mechanism is used in extensions,
replacing the shmem_{request/startup}_hooks.

ShmemInitStruct() and ShmemInitHash() become backwards-compatibility
wrappers around the new functions. In future commits, I will replace
all ShmemInitStruct() and ShmemInitHash() calls with the new
functions, although we'll still need to keep them around for
extensions.

Co-authored-by: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Reviewed-by: Matthias van de Meent <boekewurm+postgres@gmail.com>
Reviewed-by: Zsolt Parragi <zsolt.parragi@percona.com>
Reviewed-by: Robert Haas <robertmhaas@gmail.com>
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Discussion: https://www.postgresql.org/message-id/CAExHW5vM1bneLYfg0wGeAa=52UiJ3z4vKd3AJ72X8Fw6k3KKrg@mail.gmail.com
2026-04-06 02:12:50 +03:00
..
access postgres_fdw: Inherit the local transaction's access/deferrable modes. 2026-04-05 18:55:00 +09:00
archive Don't include wait_event.h in pgstat.h 2026-03-06 16:24:58 +01:00
backup Online enabling and disabling of data checksums 2026-04-03 22:58:51 +02:00
bootstrap Introduce a new mechanism for registering shared memory areas 2026-04-06 02:12:50 +03:00
catalog Allow index_create to suppress index_build progress reporting 2026-04-05 13:34:08 +02:00
commands instrumentation: Separate per-node logic from other uses 2026-04-05 19:04:24 -04:00
executor instrumentation: Separate per-node logic from other uses 2026-04-05 19:04:24 -04:00
foreign Remove bits* typedefs. 2026-03-30 16:12:08 -05:00
jit jit: No backport::SectionMemoryManager for LLVM 22. 2026-04-03 14:55:11 +13:00
lib dshash: Make it possible to suppress out of memory errors 2026-03-19 11:51:17 -04:00
libpq oauth: Let validators provide failure DETAILs 2026-04-03 16:05:33 -07:00
main Update copyright for 2026 2026-01-01 13:24:10 -05:00
nodes Add UPDATE/DELETE FOR PORTION OF 2026-04-01 19:06:03 +02:00
optimizer Add UPDATE/DELETE FOR PORTION OF 2026-04-01 19:06:03 +02:00
parser Add UPDATE/DELETE FOR PORTION OF 2026-04-01 19:06:03 +02:00
partitioning Thread flags through begin-scan APIs 2026-03-30 12:27:24 -04:00
po Update copyright for 2026 2026-01-01 13:24:10 -05:00
port Use ShmemInitStruct to allocate shmem for semaphores 2026-03-30 23:39:35 +03:00
postmaster Introduce a new mechanism for registering shared memory areas 2026-04-06 02:12:50 +03:00
regex Use fallthrough attribute instead of comment 2026-02-19 08:51:12 +01:00
replication Online enabling and disabling of data checksums 2026-04-03 22:58:51 +02:00
rewrite Add UPDATE/DELETE FOR PORTION OF 2026-04-01 19:06:03 +02:00
snowball Fix meson build of snowball code. 2026-01-05 16:51:36 -05:00
statistics Add support for extended statistics on virtual generated columns. 2026-04-01 17:02:24 +01:00
storage Introduce a new mechanism for registering shared memory areas 2026-04-06 02:12:50 +03:00
tcop Introduce a new mechanism for registering shared memory areas 2026-04-06 02:12:50 +03:00
tsearch Require superuser to install a non-built-in selectivity estimator. 2026-02-09 10:07:31 -05:00
utils Introduce a new mechanism for registering shared memory areas 2026-04-06 02:12:50 +03:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
common.mk Blind attempt to fix LLVM dependency in the backend 2022-09-15 10:53:48 +07:00
Makefile ssl: Serverside SNI support for libpq 2026-03-18 12:37:11 +01:00
meson.build Add backtrace support for Windows using DbgHelp API 2026-02-24 17:34:56 +01:00
nls.mk Create a separate file listing backend types 2025-09-26 15:21:49 +02:00