Add checkpoint/redo LSNs to recovery errors.

David Steele <david@pgmasters.net>

From: David Steele <david@pgmasters.net>
To: Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2024-02-28T21:53:15Z
Lists: pgsql-hackers

Attachments

Hackers,

This patch adds checkpoint/redo LSNs to recovery error messages where 
they may be useful for debugging.

When backup_label is present the LSNs are already output in a log 
message, but it still seems like a good idea to repeat them.

When backup_label is not present, the checkpoint LSN is not logged 
unless backup recovery is in progress or the checkpoint is found. In the 
case where a backup is restored but the backup_label is missing, the 
checkpoint LSN is not logged so it is useful for debugging to have it in 
the error message.

Regards,
-David

Commits

  1. Add some checkpoint and redo LSNs to a couple of recovery errors