mirror of
https://github.com/postgres/postgres.git
synced 2025-11-09 06:21:09 +03:00
Perform only one ReadControlFile() during startup.
Previously we read the control file in multiple places. But soon the segment size will be configurable and stored in the control file, and that needs to be available earlier than it currently is needed. Instead of adding yet another place where it's read, refactor things so there's a single processing of the control file during startup (in EXEC_BACKEND that's every individual backend's startup). Author: Andres Freund Discussion: http://postgr.es/m/20170913092828.aozd3gvvmw67gmyc@alap3.anarazel.de
This commit is contained in:
@@ -950,6 +950,9 @@ PostmasterMain(int argc, char *argv[])
|
||||
*/
|
||||
CreateDataDirLockFile(true);
|
||||
|
||||
/* read control file (error checking and contains config) */
|
||||
LocalProcessControlFile();
|
||||
|
||||
/*
|
||||
* Initialize SSL library, if specified.
|
||||
*/
|
||||
@@ -4805,6 +4808,9 @@ SubPostmasterMain(int argc, char *argv[])
|
||||
/* Read in remaining GUC variables */
|
||||
read_nondefault_variables();
|
||||
|
||||
/* (re-)read control file (contains config) */
|
||||
LocalProcessControlFile();
|
||||
|
||||
/*
|
||||
* Reload any libraries that were preloaded by the postmaster. Since we
|
||||
* exec'd this process, those libraries didn't come along with us; but we
|
||||
|
||||
Reference in New Issue
Block a user