Centralize decision-making about where to get a backend's PGPROC.

Robert Haas <rhaas@postgresql.org>

Commit: 6f2871f12e9fba5deec4296cfe12e85c140261c4
Author: Robert Haas <rhaas@postgresql.org>
Date: 2015-07-28T18:51:57Z
Releases: 9.6.0
Centralize decision-making about where to get a backend's PGPROC.

This code was originally written as part of parallel query effort, but
it seems to have independent value, because if we make one decision
about where to get a PGPROC when we allocate and then put it back on a
different list at backend-exit time, bad things happen.  This isn't
just a theoretical risk; we fixed an actual problem of this type in
commit e280c630a87e1b8325770c6073097d109d79a00f.

Files

PathChange+/−
src/backend/storage/lmgr/proc.c modified +26 −29
src/include/storage/proc.h modified +1 −0