pgsql: Fix background workers for EXEC_BACKEND

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix background workers for EXEC_BACKEND
Date: 2013-01-02 15:32:31
Message-ID: E1TqQIx-0001ML-Jj@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2013-01-02 16:36:01 Re: pgsql: Unify some tar functionality across different parts
Previous Message Magnus Hagander 2013-01-02 13:25:48 Re: pgsql: Unify some tar functionality across different parts