1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2025-01-23 11:45:36 +02:00

Fix check ptrack control file.

This commit is contained in:
stalkerg 2016-05-12 12:51:36 +03:00
parent 075c37ba68
commit ccd4f48017
3 changed files with 13 additions and 8 deletions

View File

@ -238,7 +238,7 @@ do_backup_database(parray *backup_list, pgBackupOption bkupopt)
if (current.backup_mode == BACKUP_MODE_DIFF_PTRACK)
{
XLogRecPtr ptrack_lsn = get_last_ptrack_lsn();
if (ptrack_lsn < prev_backup->start_lsn || ptrack_lsn >= current.start_lsn)
if (ptrack_lsn > prev_backup->stop_lsn)
elog(ERROR, "Wrong ptrack lsn:%lx prev:%lx current:%lx",
ptrack_lsn,
prev_backup->start_lsn,

View File

@ -32,25 +32,30 @@ OK: recovery-target-xid options works well.
###### RESTORE COMMAND TEST-0006 ######
###### recovery to latest from full + ptrack backups ######
0
1
0
0
###### RESTORE COMMAND TEST-0007 ######
###### recovery to latest from full + ptrack + ptrack backups ######
0
1
1
0
0
0
###### RESTORE COMMAND TEST-0010 ######
###### recovery to latest from full + page backups with loads when full backup do ######
###### recovery to latest from full + page backups with loads when ptrack backup do ######
0
0
1
0
###### RESTORE COMMAND TEST-0009 ######
###### recovery to latest from full + ptrack backups with loads when full backup do ######
0
1
0
0
###### RESTORE COMMAND TEST-0008 ######
###### recovery with target inclusive false ######
0
0
OK: recovery-target-inclusive=false works well.

View File

@ -79,7 +79,7 @@ echo '###### ptrack backup mode ######'
init_catalog
pg_arman backup -B ${BACKUP_PATH} -b full -p ${TEST_PGPORT} -d postgres --verbose > ${TEST_BASE}/TEST-0006-run.log 2>&1;echo $?
pg_arman validate -B ${BACKUP_PATH} --verbose >> ${TEST_BASE}/TEST-0006-run.log 2>&1
pg_arman backup -B ${BACKUP_PATH} -b ptrack -p ${TEST_PGPORT} -d postgres --verbose > ${TEST_BASE}/TEST-0006-run.log 2>&1;echo $?
pg_arman backup -B ${BACKUP_PATH} -b ptrack -p ${TEST_PGPORT} -d postgres --verbose >> ${TEST_BASE}/TEST-0006-run.log 2>&1;echo $?
pg_arman validate -B ${BACKUP_PATH} >> ${TEST_BASE}/TEST-0006-run.log 2>&1
pg_arman show -B ${BACKUP_PATH} > ${TEST_BASE}/TEST-0006.log 2>&1
grep -c OK ${TEST_BASE}/TEST-0006.log