pgsql: Fix background workers for EXEC_BACKEND - Mailing list pgsql-committers

From Alvaro Herrera
Subject pgsql: Fix background workers for EXEC_BACKEND
Date
Msg-id E1TqQIx-0001ML-Jj@gemulon.postgresql.org
Whole thread Raw
Responses Re: pgsql: Fix background workers for EXEC_BACKEND  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-committers
Fix background workers for EXEC_BACKEND

Commit da07a1e8 was broken for EXEC_BACKEND because I failed to realize
that the MaxBackends recomputation needed to be duplicated by
subprocesses in SubPostmasterMain.  However, instead of having the value
be recomputed at all, it's better to assign the correct value at
postmaster initialization time, and have it be propagated to exec'ed
backends via BackendParameters.

MaxBackends stays as zero until after modules in
shared_preload_libraries have had a chance to register bgworkers, since
the value is going to be untrustworthy till that's finished.

Heikki Linnakangas and Álvaro Herrera

Branch
------
master

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

Modified Files
--------------
src/backend/postmaster/postmaster.c |   44 ++++++++++++++++++++++++++++------
src/backend/utils/init/globals.c    |    9 ++++---
src/backend/utils/misc/guc.c        |   30 +----------------------
src/include/postmaster/postmaster.h |    9 +++++++
4 files changed, 52 insertions(+), 40 deletions(-)


pgsql-committers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: pgsql: Unify some tar functionality across different parts
Next
From: Tom Lane
Date:
Subject: Re: pgsql: Unify some tar functionality across different parts