pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Postpone some end-of-recovery operations related to allowing WAL
Date: Thu, 14 Oct 2021 16:01:56 +0000
Message-ID: <E1mb3B6-0002oJ-FN@gemulon.postgresql.org> (raw)

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(-)



Message-ID: <E1mb3B6-0002oJ-FN@gemulon.postgresql.org>
Permalink:  ../E1mb3B6-0002oJ-FN@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1mb3B6-0002oJ-FN@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: rhaas@postgresql.org
  Subject: Re: pgsql: Postpone some end-of-recovery operations related to allowing WAL
  In-Reply-To: <E1mb3B6-0002oJ-FN@gemulon.postgresql.org>
  References: <E1mb3B6-0002oJ-FN@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox