pgsql: Perform only one ReadControlFile() during startup.
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@postgresql.org
Date: 2017-09-14T21:18:53Z
Lists: pgsql-hackers
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 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/8356753c212a5865469c9befc4cf1e637a9d8bbc Modified Files -------------- src/backend/access/transam/xlog.c | 48 ++++++++++++++++++++++++++----------- src/backend/postmaster/postmaster.c | 6 +++++ src/backend/tcop/postgres.c | 3 +++ src/include/access/xlog.h | 1 + 4 files changed, 44 insertions(+), 14 deletions(-)
Commits
-
Add test for postmaster crash restarts.
- a1924a4ea293 11.0 landed
-
Fix crash restart bug introduced in 8356753c212.
- ec9e05b3c392 11.0 landed
-
Perform only one ReadControlFile() during startup.
- 8356753c212a 11.0 cited