Re: Use of backup_label not noted in log
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: David Steele <david@pgmasters.net>
Cc: Andres Freund <andres@anarazel.de>, Pg Hackers <pgsql-hackers@postgresql.org>, Laurenz Albe <laurenz.albe@cybertec.at>
Date: 2024-01-22T07:36:27Z
Lists: pgsql-hackers
On Fri, Jan 19, 2024 at 09:32:26AM -0400, David Steele wrote:
> Any status on this patch? If we do back patch it would be nice to see this
> in the upcoming minor releases. I'm in favor of a back patch, as I think
> this is minimally invasive and would be very useful for debugging recovery
> issues.
I am not sure about the backpatch part, but on a second look I'm OK
with applying it on HEAD for now with the LOG added for the startup of
recovery when the backup_label file is read, for the recovery
completed from a backup, and for the restart from a backup.
> I like the phrasing you demonstrated in [1] but doesn't seem like there's a
> new patch for that, so I have attached one.
+ if (ControlFile->backupStartPoint != InvalidXLogRecPtr)
Nit 1: I would use XLogRecPtrIsInvalid here.
+ ereport(LOG,
+ (errmsg("completed backup recovery with redo LSN %X/%X",
+ LSN_FORMAT_ARGS(oldBackupStartPoint))));
Nit 2: How about adding backupEndPoint in this LOG? That would give:
"completed backup recovery with redo LSN %X/%X and end LSN %X/%X".
--
Michael
Commits
-
Add more LOG messages when starting and ending recovery from a backup
- 8b34cff3381a 15.6 landed
- edbd1b41ab5b 16.2 landed
- 1d35f705e191 17.0 landed