]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Add more LOG messages when starting and ending recovery from a backup
authorMichael Paquier <michael@paquier.xyz>
Thu, 25 Jan 2024 08:07:56 +0000 (17:07 +0900)
committerMichael Paquier <michael@paquier.xyz>
Mon, 29 Jan 2024 00:04:55 +0000 (09:04 +0900)
commit8b34cff3381a6a1d3c3d97141d468d468d2a2551
tree57c11ec6108b95226fab1ffa7f084b6145a59a50
parent86b6243a8ea92760679b6d9a8bbaab562b27a9db
Add more LOG messages when starting and ending recovery from a backup

Three LOG messages are added in the recovery code paths, providing
information that can be useful to track corruption issues depending on
the state of the cluster, telling that:
- Recovery has started from a backup_label.
- Recovery is restarting from a backup start LSN, without a
backup_label.
- Recovery has completed from a backup.

This was originally applied on HEAD as of 1d35f705e191, and there is
consensus that this can be useful for older versions.  This applies
cleanly down to 15, so do it down to this version for now (older
versions have heavily refactored the WAL recovery paths, making the
change less straight-forward to do).

Author: Andres Freund
Reviewed-by: David Steele, Laurenz Albe, Michael Paquier
Discussion: https://postgr.es/m/20231117041811.vz4vgkthwjnwp2pp@awork3.anarazel.de
Backpatch-through: 15
src/backend/access/transam/xlogrecovery.c