postgresql/src/backend/utils
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
..
activity Merge init and max size options on shmem hash tables 2026-04-04 02:40:20 +03:00
adt Fixups for a4f774cf1c 2026-04-05 15:36:34 -04:00
cache Add UPDATE/DELETE FOR PORTION OF 2026-04-01 19:06:03 +02:00
error Add FATAL_CLIENT_ONLY to ereport/elog 2026-03-31 11:47:29 -07:00
fmgr Remove bits* typedefs. 2026-03-30 16:12:08 -05:00
hash Introduce a new mechanism for registering shared memory areas 2026-04-06 02:12:50 +03:00
init Online enabling and disabling of data checksums 2026-04-03 22:58:51 +02:00
mb Fix additional fallthrough warnings from clang 2026-02-23 07:40:19 +01:00
misc Online enabling and disabling of data checksums 2026-04-03 22:58:51 +02:00
mmgr Use standard C23 and C++ attributes if available 2026-04-01 08:15:02 +02:00
resowner Update copyright for 2026 2026-01-01 13:24:10 -05:00
sort Skip common prefixes during radix sort 2026-04-01 14:18:57 +07:00
time Update copyright for 2026 2026-01-01 13:24:10 -05:00
.gitignore Fix build inconsistency due to the generation of wait-event code 2026-02-02 08:02:39 +09:00
errcodes.txt Update copyright for 2026 2026-01-01 13:24:10 -05:00
Gen_dummy_probes.pl Update copyright for 2026 2026-01-01 13:24:10 -05:00
Gen_fmgrtab.pl Update copyright for 2026 2026-01-01 13:24:10 -05:00
generate-errcodes.pl Update copyright for 2026 2026-01-01 13:24:10 -05:00
Makefile Fix build inconsistency due to the generation of wait-event code 2026-02-02 08:02:39 +09:00
meson.build Update copyright for 2026 2026-01-01 13:24:10 -05:00
postprocess_dtrace.sed Update copyright for 2026 2026-01-01 13:24:10 -05:00
probes.d Update copyright for 2026 2026-01-01 13:24:10 -05:00