postgresql/src/bin/pg_verifybackup
Michael Paquier 29f9423251 Fix backup manifests to generate correct WAL-Ranges across timelines
In a backup manifest, WAL-Ranges stores the range of WAL that is
required for the backup to be valid.  pg_verifybackup would then
internally use pg_waldump for the checks based on this data.

When the timeline where the backup started was more than 1 with a
history file looked at for the manifest data generation, the calculation
of the WAL range for the first timeline to check was incorrect.  The
previous logic used as start LSN the start position of the first
timeline, but it needs to use the start LSN of the backup.  This would
cause failures with pg_verifybackup, or any tools making use of the
backup manifests.

This commit adds a test based on a logic using a self-promoted node,
making it rather cheap.

Author: Kyotaro Horiguchi
Discussion: https://postgr.es/m/20210818.143031.1867083699202617521.horikyota.ntt@gmail.com
Backpatch-through: 13
2021-08-23 11:09:57 +09:00
..
po Translation updates 2021-08-09 11:56:40 +02:00
t Fix backup manifests to generate correct WAL-Ranges across timelines 2021-08-23 11:09:57 +09:00
.gitignore Rename pg_validatebackup to pg_verifybackup. 2020-04-12 11:26:05 -04:00
Makefile Rename pg_validatebackup to pg_verifybackup. 2020-04-12 11:26:05 -04:00
nls.mk Translation updates 2021-02-08 17:41:32 +01:00
parse_manifest.c Message fixes and style improvements 2020-09-14 06:42:07 +02:00
parse_manifest.h Initial pgindent and pgperltidy run for v13. 2020-05-14 13:06:50 -04:00
pg_verifybackup.c Add missing exit() in pg_verifybackup when failing to find pg_waldump 2021-07-29 11:00:00 +09:00