1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-07 19:06:32 +03:00

Fix misleading comments about background worker registration.

Since 6bc8ef0b7f, the maximum number
of backends can't change as background workers are registered, but
these comments still reflect the way things worked prior to that.

Also, per recent discussion, some modules call SetConfigOption()
from _PG_init(). It's not entirely clear to me whether we want to
regard that as a fully supported operation, but since we know it's
a thing that happens, it at least deserves a mention in the comments,
so add that.

Nathan Bossart, reviewed by Anton A. Melnikov

Discussion: http://postgr.es/m/20220419154658.GA2487941@nathanxps13
This commit is contained in:
Robert Haas
2022-05-06 09:24:06 -04:00
parent ee97d46cdb
commit 701d918a42
2 changed files with 6 additions and 9 deletions

View File

@@ -1005,10 +1005,8 @@ PostmasterMain(int argc, char *argv[])
LocalProcessControlFile(false);
/*
* Register the apply launcher. Since it registers a background worker,
* it needs to be called before InitializeMaxBackends(), and it's probably
* a good idea to call it before any modules had chance to take the
* background worker slots.
* Register the apply launcher. It's probably a good idea to call this
* before any modules had a chance to take the background worker slots.
*/
ApplyLauncherRegister();
@@ -1029,8 +1027,8 @@ PostmasterMain(int argc, char *argv[])
#endif
/*
* Now that loadable modules have had their chance to register background
* workers, calculate MaxBackends.
* Now that loadable modules have had their chance to alter any GUCs,
* calculate MaxBackends.
*/
InitializeMaxBackends();