pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Delay recovery mode LOG after reading backup_label and/or checkp
Date: Mon, 30 Oct 2023 06:29:29 +0000
Message-ID: <E1qxLmC-0034DA-RT@gemulon.postgresql.org> (raw)

Delay recovery mode LOG after reading backup_label and/or checkpoint record

When beginning recovery, a LOG is displayed by the startup process to
show which recovery mode will be used depending on the .signal file(s)
set in the data folder, like "standby mode", recovery up to a given
target type and value, or archive recovery.

A different patch is under discussion to simplify the startup code by
requiring the presence of recovery.signal and/or standby.signal when a
backup_label file is read.  Delaying a bit this LOG ensures that the
correct recovery mode would be reported, and putting it at this position
does not make it lose its value.

While on it, this commit adds a few comments documenting a bit more the
initial recovery steps and their dependencies, and fixes an incorrect
comment format.  This introduces no behavior changes.

Extracted from a larger patch by me.

Reviewed-by: David Steele, Bowen Shi
Discussion: https://postgr.es/m/ZArVOMifjzE7f8W7@paquier.xyz

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/dc5bd38894373e6806289e3aca26e7fafa5f6f95

Modified Files
--------------
src/backend/access/transam/xlogrecovery.c | 73 ++++++++++++++++++-------------
1 file changed, 42 insertions(+), 31 deletions(-)



Message-ID: <E1qxLmC-0034DA-RT@gemulon.postgresql.org>
Permalink:  ../E1qxLmC-0034DA-RT@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1qxLmC-0034DA-RT@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 using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Delay recovery mode LOG after reading backup_label and/or checkp
  In-Reply-To: <E1qxLmC-0034DA-RT@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