pgsql: Postpone some end-of-recovery operations related to allowing WAL

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Postpone some end-of-recovery operations related to allowing WAL
Date: 2021-10-14 16:01:56
Message-ID: E1mb3B6-0002oJ-FN@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Postpone some end-of-recovery operations related to allowing WAL.

CreateOverwriteContrecordRecord(), UpdateFullPageWrites(),
PerformRecoveryXLogAction(), and CleanupAfterArchiveRecovery()
are moved somewhat later in StartupXLOG(). This is preparatory
work for a future patch that wants to allow recovery to end at one
time and only later start to allow WAL writes. To do that, it's
necessary to separate code that has to do with allowing WAL writes
from other things that need to happen simply because recovery is
ending, such as initializing shared memory data structures that
depend on information that might not be accurate before redo is
complete.

This commit does not achieve that goal, but it is a step in that
direction. For example, there are a few different bits of code that
write things into WAL once we have finished recovery, and with this
change, those bits of code are closer to each other than previously,
with fewer unrelated bits of code interspersed.

Robert Haas and Amul Sul

Discussion: http://postgr.es/m/CAAJ_b97abMuq=470Wahun=aS1PHTSbStHtrjjPaD-C0YQ1AqVw@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/811051c2e7af1b030467760baf7ee0f4a22bc992

Modified Files
--------------
src/backend/access/transam/xlog.c | 64 ++++++++++++++++++++++-----------------
1 file changed, 36 insertions(+), 28 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2021-10-14 16:44:08 pgsql: Fix planner error with pulling up subquery expressions into func
Previous Message Peter Geoghegan 2021-10-14 04:04:11 Re: pgsql: Add more $Test::Builder::Level in the TAP tests