Skip to content

Commit d3a3864

Browse files
committed
Merge branch 'master' into release_2_4
2 parents 08b9cb7 + 8aff48f commit d3a3864

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed

src/backup.c

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

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

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

tests/ptrack.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -413,16 +413,9 @@ def test_ptrack_uncommitted_xact(self):
413413
backup_dir, 'node', node, backup_type='ptrack',
414414
options=['--stream'])
415415

416-
# TODO: what's the point in taking pgdata content, then taking
417-
# backup, and the trying to compare those two? Backup issues a
418-
# checkpoint, so it will modify pgdata with close to 100% chance.
419416
if self.paranoia:
420417
pgdata = self.pgdata_content(node.data_dir)
421418

422-
self.backup_node(
423-
backup_dir, 'node', node, backup_type='ptrack',
424-
options=['--stream'])
425-
426419
node_restored = self.make_simple_node(
427420
base_dir=os.path.join(module_name, fname, 'node_restored'))
428421
node_restored.cleanup()
@@ -3954,7 +3947,7 @@ def test_ptrack_pg_resetxlog(self):
39543947
)
39553948
except ProbackupException as e:
39563949
self.assertIn(
3957-
'ERROR: LSN from ptrack_control 0/0 differs from STOP LSN of previous backup',
3950+
'ERROR: LSN from ptrack_control 0/0 differs from Start LSN of previous backup',
39583951
e.message,
39593952
'\n Unexpected Error Message: {0}\n'
39603953
' CMD: {1}'.format(repr(e.message), self.cmd))

0 commit comments

Comments
 (0)