]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Move ProcStructLock to the ProcGlobal struct
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Wed, 11 Feb 2026 14:48:45 +0000 (16:48 +0200)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Wed, 11 Feb 2026 14:48:45 +0000 (16:48 +0200)
commit7984ce7a1d21819865e473f17cb6b928cf58a10d
tree742c244b162deee535ccc8974465dab53a8e5cb7
parentbc953bf52314ca881a18703f86b68743ef6f3a32
Move ProcStructLock to the ProcGlobal struct

It protects the freeProcs and some other fields in ProcGlobal, so
let's move it there. It's good for cache locality to have it next to
the thing it protects, and just makes more sense anyway. I believe it
was allocated as a separate shared memory area just for historical
reasons.

Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Reviewed-by: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Discussion: https://www.postgresql.org/message-id/b78719db-0c54-409f-b185-b0d59261143f@iki.fi
src/backend/postmaster/launch_backend.c
src/backend/storage/lmgr/proc.c
src/include/storage/proc.h