summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorRobert Haas2015-07-28 18:51:57 +0000
committerRobert Haas2015-07-28 18:51:57 +0000
commit6f2871f12e9fba5deec4296cfe12e85c140261c4 (patch)
treeb8f7aba03bdb6d8d365d383ae63a97a364e9fcb7 /src/include
parent95f4e59c3286671656aff7db45b322f14a7bb8cc (diff)
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.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/storage/proc.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/storage/proc.h b/src/include/storage/proc.h
index e807a2e020d..202a672bca5 100644
--- a/src/include/storage/proc.h
+++ b/src/include/storage/proc.h
@@ -78,6 +78,7 @@ struct PGPROC
{
/* proc->links MUST BE FIRST IN STRUCT (see ProcSleep,ProcWakeup,etc) */
SHM_QUEUE links; /* list link if process is in a list */
+ PGPROC **procgloballist; /* procglobal list that owns this PGPROC */
PGSemaphoreData sem; /* ONE semaphore to sleep on */
int waitStatus; /* STATUS_WAITING, STATUS_OK or STATUS_ERROR */