]> granicus.if.org Git - postgresql/commit
Fix mishandling of background worker PGPROCs in EXEC_BACKEND builds.
authorRobert Haas <rhaas@postgresql.org>
Wed, 30 Jul 2014 15:25:58 +0000 (11:25 -0400)
committerRobert Haas <rhaas@postgresql.org>
Wed, 30 Jul 2014 15:58:03 +0000 (11:58 -0400)
commitaeebacff114634ffa07b5299ee6c41b219717bc3
treee3f2d2e621fb97d18db5635688cbcd6692d1faa6
parent98c5fe5d0df8549972f46c324d9c6b18b4c4ecc0
Fix mishandling of background worker PGPROCs in EXEC_BACKEND builds.

InitProcess() relies on IsBackgroundWorker to decide whether the PGPROC
for a new backend should be taken from ProcGlobal's freeProcs or from
bgworkerFreeProcs.  In EXEC_BACKEND builds, InitProcess() is called
sooner than in non-EXEC_BACKEND builds, and IsBackgroundWorker wasn't
getting initialized soon enough.

Report by Noah Misch.  Diagnosis and fix by me.
src/backend/postmaster/postmaster.c