Skip to content

Commit 734e495

Browse files
committed
[Issue #225] ptrack LSN should be compared with parent Start LSN instead of parent Stop LSN
1 parent f7edee6 commit 734e495

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/backup.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -237,19 +237,19 @@ do_backup_instance(PGconn *backup_conn, PGNodeInfo *nodeInfo, bool no_sync)
237237

238238
/*
239239
* It`s illegal to take PTRACK backup if LSN from ptrack_control() is not
240-
* equal to stop_lsn of previous backup.
240+
* equal to start_lsn of previous backup.
241241
*/
242242
if (current.backup_mode == BACKUP_MODE_DIFF_PTRACK)
243243
{
244244
XLogRecPtr ptrack_lsn = get_last_ptrack_lsn(backup_conn, nodeInfo);
245245

246-
if (ptrack_lsn > prev_backup->stop_lsn || ptrack_lsn == InvalidXLogRecPtr)
246+
if (ptrack_lsn > prev_backup->start_lsn || ptrack_lsn == InvalidXLogRecPtr)
247247
{
248-
elog(ERROR, "LSN from ptrack_control %X/%X differs from STOP LSN of previous backup %X/%X.\n"
248+
elog(ERROR, "LSN from ptrack_control %X/%X differs from Start LSN of previous backup %X/%X.\n"
249249
"Create new full backup before an incremental one.",
250250
(uint32) (ptrack_lsn >> 32), (uint32) (ptrack_lsn),
251-
(uint32) (prev_backup->stop_lsn >> 32),
252-
(uint32) (prev_backup->stop_lsn));
251+
(uint32) (prev_backup->start_lsn >> 32),
252+
(uint32) (prev_backup->start_lsn));
253253
}
254254
}
255255

0 commit comments

Comments
 (0)