From be3e84d2448d265c45b88adf65ff2475eff48aa4 Mon Sep 17 00:00:00 2001 From: sai pranav Date: Thu, 8 Oct 2026 13:04:00 +0530 Subject: [PATCH v1] Add a hint to the "WAL summaries are required" errors When an incremental backup is refused because the WAL summaries for the required range are missing or incomplete, the message says what is wrong but not what to do about it. By the time these errors are raised the server has already waited for WAL summarization to catch up, so the summaries are not coming: summarization was disabled for part of the range (often it was enabled only after the full backup was taken), or the summaries have been removed. In all of these cases the remedy is a new full backup, so say so. --- src/backend/backup/basebackup_incremental.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/backend/backup/basebackup_incremental.c b/src/backend/backup/basebackup_incremental.c index 27fc42a..de92e23 100644 --- a/src/backend/backup/basebackup_incremental.c +++ b/src/backend/backup/basebackup_incremental.c @@ -524,7 +524,8 @@ PrepareForIncrementalBackup(IncrementalBackupInfo *ib, errmsg("WAL summaries are required on timeline %u from %X/%08X to %X/%08X, but no summaries for that timeline and LSN range exist", tle->tli, LSN_FORMAT_ARGS(tli_start_lsn), - LSN_FORMAT_ARGS(tli_end_lsn)))); + LSN_FORMAT_ARGS(tli_end_lsn)), + errhint("Take a new full backup if WAL summarization was not enabled for this whole range or the required summaries have been removed."))); else ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), @@ -533,7 +534,8 @@ PrepareForIncrementalBackup(IncrementalBackupInfo *ib, LSN_FORMAT_ARGS(tli_start_lsn), LSN_FORMAT_ARGS(tli_end_lsn)), errdetail("The first unsummarized LSN in this range is %X/%08X.", - LSN_FORMAT_ARGS(tli_missing_lsn)))); + LSN_FORMAT_ARGS(tli_missing_lsn)), + errhint("Take a new full backup if WAL summarization was not enabled for this whole range or the required summaries have been removed."))); } /* -- 2.50.1 (Apple Git-155)