diff options
author | Andres Freund <andres@anarazel.de> | 2017-09-13 02:12:17 -0700 |
---|---|---|
committer | Andres Freund <andres@anarazel.de> | 2017-09-14 14:14:34 -0700 |
commit | 8356753c212a5865469c9befc4cf1e637a9d8bbc (patch) | |
tree | 60fcf71cb5a90a687e5306263d9831e89e413ab4 /src/backend/tcop/postgres.c | |
parent | 0a480502b092195a9b25a2f0f199a21d592a9c57 (diff) | |
download | postgresql-8356753c212a5865469c9befc4cf1e637a9d8bbc.tar.gz postgresql-8356753c212a5865469c9befc4cf1e637a9d8bbc.zip |
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
Diffstat (limited to 'src/backend/tcop/postgres.c')
-rw-r--r-- | src/backend/tcop/postgres.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index 4eb85720a74..46b662266b5 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -3717,6 +3717,9 @@ PostgresMain(int argc, char *argv[], */ CreateDataDirLockFile(false); + /* read control file (error checking and contains config ) */ + LocalProcessControlFile(); + /* Initialize MaxBackends (if under postmaster, was done already) */ InitializeMaxBackends(); } |