pgsql: Fix mishandling of background worker PGPROCs in EXEC_BACKEND bui

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix mishandling of background worker PGPROCs in EXEC_BACKEND bui
Date: 2014-07-30 16:15:45
Message-ID: E1XCWXZ-0005lG-Vw@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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.

Branch
------
REL9_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/aeebacff114634ffa07b5299ee6c41b219717bc3

Modified Files
--------------
src/backend/postmaster/postmaster.c | 3 +++
1 file changed, 3 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2014-07-30 17:24:30 pgsql: pgbench: Allow \setrandom to generate Gaussian/exponential distr
Previous Message Peter Eisentraut 2014-07-30 03:55:18 pgsql: doc: Clean up some recently added PL/pgSQL documentation