Use ShmemInitStruct to allocate lwlock.c's shared memory
Heikki Linnakangas <heikki.linnakangas@iki.fi>
Author:
Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date: 2026-03-26T21:51:41Z
Releases:
19 (unreleased)
Use ShmemInitStruct to allocate lwlock.c's shared memory It's nice to have them show up in pg_shmem_allocations like all other shmem areas. ShmemInitStruct() depends on ShmemIndexLock, but only after postmaster startup. Reviewed-by: Nathan Bossart <nathandbossart@gmail.com> Discussion: https://www.postgresql.org/message-id/47aaf57e-1b7b-4e12-bda2-0316081ff50e@iki.fi
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/postmaster/launch_backend.c | modified | +0 −6 |
| src/backend/storage/ipc/ipci.c | modified | +2 −2 |
| src/backend/storage/lmgr/lwlock.c | modified | +22 −10 |
| src/include/storage/lwlock.h | modified | +1 −6 |
Discussion
- Clean up NamedLWLockTranche stuff 18 messages · 2026-03-26 → 2026-03-30