You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Add new GUC, max_worker_processes, limiting number of bgworkers.
In 9.3, there's no particular limit on the number of bgworkers;instead, we just count up the number that are actually registered,and use that to set MaxBackends. However, that approach causesproblems for Hot Standby, which needs both MaxBackends and thesize of the lock table to be the same on the standby as on themaster, yet it may not be desirable to run the same bgworkers inboth places. 9.3 handles that by failing to notice the problem,which will probably work fine in nearly all cases anyway, but isnot theoretically sound.A further problem with simply counting the number of registeredworkers is that new workers can't be registered without apostmaster restart. This is inconvenient for administrators,since bouncing the postmaster causes an interruption of service.Moreover, there are a number of applications for backgroundprocesses where, by necessity, the background process must bestarted on the fly (e.g. parallel query). While this patchdoesn't actually make it possible to register new backgroundworkers after startup time, it's a necessary prerequisite.Patch by me. Review by Michael Paquier.