mirror of
https://github.com/postgrespro/pg_probackup.git
synced 2024-11-25 09:01:48 +02:00
Fix archive_catalog problem exposed by b1975e3ba
.
Now it's legal to find in archive two files with equal segno. This can happen if both compressed and non-compessed versions are present.
This commit is contained in:
parent
6b8ab83548
commit
c9d3c5845a
@ -791,8 +791,15 @@ catalog_get_timelines(InstanceConfig *instance)
|
||||
/* check, if segments are consequent */
|
||||
XLogSegNo expected_segno = tlinfo->end_segno + 1;
|
||||
|
||||
/* some segments are missing. remember them in lost_segments to report */
|
||||
if (segno != expected_segno)
|
||||
/*
|
||||
* Some segments are missing. remember them in lost_segments to report.
|
||||
* Normally we expect that segment numbers form an increasing sequence,
|
||||
* though it's legal to find two files with equal segno in case there
|
||||
* are both compressed and non-compessed versions. For example
|
||||
* 000000010000000000000002 and 000000010000000000000002.gz
|
||||
*
|
||||
*/
|
||||
if (segno != expected_segno && segno != tlinfo->end_segno)
|
||||
{
|
||||
xlogInterval *interval = palloc(sizeof(xlogInterval));;
|
||||
interval->begin_segno = expected_segno;
|
||||
|
Loading…
Reference in New Issue
Block a user