Skip to content

Commit 6c2050f

Browse files
committed
validate ptrack_lsn to InvalidXLogRecPtr
1 parent 3700576 commit 6c2050f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ do_backup_instance(void)
596596
{
597597
XLogRecPtr ptrack_lsn = get_last_ptrack_lsn();
598598

599-
if (ptrack_lsn > prev_backup->stop_lsn)
599+
if (ptrack_lsn > prev_backup->stop_lsn || ptrack_lsn == InvalidXLogRecPtr)
600600
{
601601
elog(ERROR, "LSN from ptrack_control %lx differs from STOP LSN of previous backup %lx.\n"
602602
"Create new full backup before an incremental one.",

0 commit comments

Comments
 (0)