pgsql: Perform only one ReadControlFile() during startup.

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Perform only one ReadControlFile() during startup.
Date: 2017-09-14 21:18:53
Message-ID: E1dsbXB-0006pK-EE@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers 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(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2017-09-14 21:19:15 pgsql: Add missing tags to GetCommandLogLevel.
Previous Message Robert Haas 2017-09-14 19:41:55 pgsql: Expand partitioned table RTEs level by level, without flattening

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2017-09-14 21:19:48 Re: Warnings "unrecognized node type" for some DDLs with log_statement = 'ddl'
Previous Message Thomas Munro 2017-09-14 20:59:06 Re: Patches that don't apply or don't compile: 2017-09-12