pgsql: Delay recovery mode LOG after reading backup_label and/or checkp - Mailing list pgsql-committers

From Michael Paquier
Subject pgsql: Delay recovery mode LOG after reading backup_label and/or checkp
Date
Msg-id E1qxLmC-0034DA-RT@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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(-)


pgsql-committers by date:

Previous
From: Amit Kapila
Date:
Subject: pgsql: Doc: Make link names consistent in logical replication commands.
Next
From: Michael Paquier
Date:
Subject: Re: pgsql: doc: comment wording improvement