postgres.git / summary / log / commit / refs

commit    fbf8df580aebf2fdba5e495bac508ecdd26c493c
Author:   Michael Paquier <michael@paquier.xyz>
Date:     Sun Jan 18 08:25:03 2026 +0000
First released in: 14.21, 15.16, 16.12, 17.8, 18.2

    Fix error message related to end TLI in backup manifest
    
    The code adding the WAL information included in a backup manifest is
    cross-checked with the contents of the timeline history file of the end
    timeline.  A check based on the end timeline, when it fails, reported
    the value of the start timeline in the error message.  This error is
    fixed to show the correct timeline number in the report.
    
    This error report would be confusing for users if seen, because it would
    provide an incorrect information, so backpatch all the way down.
    
    Oversight in 0d8c9c1210c4.
    
    Author: Man Zeng <zengman@halodbtech.com>
    Discussion: https://postgr.es/m/tencent_0F2949C4594556F672CF4658@qq.com
    Backpatch-through: 14


src/backend/backup/backup_manifest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/backup/backup_manifest.c b/src/backend/backup/backup_manifest.c index 618bd0d5550..c805822e22b 100644 --- a/src/backend/backup/backup_manifest.c +++ b/src/backend/backup/backup_manifest.c @@ -251,7 +251,7 @@ AddWALInfoToBackupManifest(backup_manifest_info *manifest, XLogRecPtr startptr, if (first_wal_range && endtli != entry->tli) ereport(ERROR, errmsg("expected end timeline %u but found timeline %u", - starttli, entry->tli)); + endtli, entry->tli)); /* * If this timeline entry matches with the timeline on which the [parent: b926ff1373bb]