You've already forked pg_probackup
mirror of
https://github.com/postgrespro/pg_probackup.git
synced 2026-06-21 01:34:15 +02:00
fix for < Pg13
This commit is contained in:
+8
-4
@@ -573,8 +573,7 @@ read_recovery_info(const char *archivedir, TimeLineID tli, uint32 wal_seg_size,
|
|||||||
{
|
{
|
||||||
XLogRecPtr errptr;
|
XLogRecPtr errptr;
|
||||||
|
|
||||||
//errptr = startpoint ? startpoint : xlogreader->EndRecPtr;
|
errptr = xlogreader->ReadRecPtr;
|
||||||
errptr = curpoint;
|
|
||||||
|
|
||||||
if (errormsg)
|
if (errormsg)
|
||||||
elog(ERROR, "Could not read WAL record at %X/%X: %s",
|
elog(ERROR, "Could not read WAL record at %X/%X: %s",
|
||||||
@@ -585,7 +584,11 @@ read_recovery_info(const char *archivedir, TimeLineID tli, uint32 wal_seg_size,
|
|||||||
(uint32) (errptr >> 32), (uint32) (errptr));
|
(uint32) (errptr >> 32), (uint32) (errptr));
|
||||||
}
|
}
|
||||||
|
|
||||||
curpoint = xlogreader->EndRecPtr;
|
/*
|
||||||
|
* Prior Pg13 we need to set it to continue.
|
||||||
|
* After Pg13 it is ignored in WalReadRecord.
|
||||||
|
*/
|
||||||
|
curpoint = InvalidXLogRecPtr;
|
||||||
|
|
||||||
if (getRecordTimestamp(xlogreader, &last_time))
|
if (getRecordTimestamp(xlogreader, &last_time))
|
||||||
{
|
{
|
||||||
@@ -594,12 +597,13 @@ read_recovery_info(const char *archivedir, TimeLineID tli, uint32 wal_seg_size,
|
|||||||
/* Found timestamp in WAL record 'record' */
|
/* Found timestamp in WAL record 'record' */
|
||||||
res = true;
|
res = true;
|
||||||
}
|
}
|
||||||
} while (curpoint <= endpoint);
|
} while (xlogreader->EndRecPtr < endpoint+1);
|
||||||
|
|
||||||
if (res)
|
if (res)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
/* goto previous segment */
|
/* goto previous segment */
|
||||||
|
endpoint = endpoint - (endpoint % wal_seg_size) - 1;
|
||||||
startpoint -= wal_seg_size;
|
startpoint -= wal_seg_size;
|
||||||
} while (startpoint + wal_seg_size > start_lsn);
|
} while (startpoint + wal_seg_size > start_lsn);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user