mirror of
https://github.com/postgres/postgres.git
synced 2025-08-25 20:23:07 +03:00
Make sure MaxBackends is always set
Auxiliary and bootstrap processes weren't getting it, causing initdb to fail completely.
This commit is contained in:
@@ -899,13 +899,9 @@ PostmasterMain(int argc, char *argv[])
|
||||
|
||||
/*
|
||||
* Now that loadable modules have had their chance to register background
|
||||
* workers, calculate MaxBackends. Add one for the autovacuum launcher.
|
||||
* workers, calculate MaxBackends.
|
||||
*/
|
||||
MaxBackends = MaxConnections + autovacuum_max_workers + 1 +
|
||||
GetNumShmemAttachedBgworkers();
|
||||
/* internal error because the values were all checked previously */
|
||||
if (MaxBackends > MAX_BACKENDS)
|
||||
elog(ERROR, "too many backends configured");
|
||||
InitializeMaxBackends();
|
||||
|
||||
/*
|
||||
* Establish input sockets.
|
||||
|
Reference in New Issue
Block a user