Re: fix bgworkers in EXEC_BACKEND

From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: fix bgworkers in EXEC_BACKEND
Date: 2012-12-29 16:15:50
Message-ID: 50DF1736.1050703@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 27.12.2012 22:46, Alvaro Herrera wrote:
> Heikki Linnakangas wrote:
>
>> Might be cleaner to directly assign the correct value to MaxBackends
>> above, ie. "MaxBackends = MaxConnections + newval + 1 +
>> GetNumShmemAttachedBgworkers()". With a comment to remind that it
>> needs to be kept in sync with the other places where that
>> calculation is done, in guc.c. Or put that calculation in a new
>> function and call it above and in guc.c.
>>
>> Thinking about this some more, it might be cleaner to move the
>> responsibility of setting MaxBackends out of guc.c, into
>> postmaster.c. The guc machinery would set max_connections and
>> autovacuum_max_workers as usual, but not try to set MaxBackends.
>> After reading the config file in postmaster.c, calculate
>> MaxBackends.
>
> Here's a small patch that applies on top of yours. Do you intend to
> commit this? If not, let me know and I'll do it.

Wasn't planning to, feel free to commit.

- Heikki

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-12-29 16:24:05 Re: inconsistent time zone formats in log
Previous Message Peter Geoghegan 2012-12-29 16:07:58 Re: enhanced error fields