Skip to content

Commit ccd4f48

Browse files
committed
Fix check ptrack control file.
1 parent 075c37b commit ccd4f48

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

backup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ do_backup_database(parray *backup_list, pgBackupOption bkupopt)
238238
if (current.backup_mode == BACKUP_MODE_DIFF_PTRACK)
239239
{
240240
XLogRecPtr ptrack_lsn = get_last_ptrack_lsn();
241-
if (ptrack_lsn < prev_backup->start_lsn || ptrack_lsn >= current.start_lsn)
241+
if (ptrack_lsn > prev_backup->stop_lsn)
242242
elog(ERROR, "Wrong ptrack lsn:%lx prev:%lx current:%lx",
243243
ptrack_lsn,
244244
prev_backup->start_lsn,

expected/restore.out

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,25 +32,30 @@ OK: recovery-target-xid options works well.
3232
###### RESTORE COMMAND TEST-0006 ######
3333
###### recovery to latest from full + ptrack backups ######
3434
0
35-
1
35+
0
3636
0
3737

3838
###### RESTORE COMMAND TEST-0007 ######
3939
###### recovery to latest from full + ptrack + ptrack backups ######
4040
0
41-
1
42-
1
41+
0
42+
0
4343
0
4444

4545
###### RESTORE COMMAND TEST-0010 ######
46-
###### recovery to latest from full + page backups with loads when full backup do ######
46+
###### recovery to latest from full + page backups with loads when ptrack backup do ######
47+
0
4748
0
48-
1
4949
0
5050

5151
###### RESTORE COMMAND TEST-0009 ######
5252
###### recovery to latest from full + ptrack backups with loads when full backup do ######
5353
0
54-
1
54+
0
5555
0
5656

57+
###### RESTORE COMMAND TEST-0008 ######
58+
###### recovery with target inclusive false ######
59+
0
60+
0
61+
OK: recovery-target-inclusive=false works well.

sql/backup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ echo '###### ptrack backup mode ######'
7979
init_catalog
8080
pg_arman backup -B ${BACKUP_PATH} -b full -p ${TEST_PGPORT} -d postgres --verbose > ${TEST_BASE}/TEST-0006-run.log 2>&1;echo $?
8181
pg_arman validate -B ${BACKUP_PATH} --verbose >> ${TEST_BASE}/TEST-0006-run.log 2>&1
82-
pg_arman backup -B ${BACKUP_PATH} -b ptrack -p ${TEST_PGPORT} -d postgres --verbose > ${TEST_BASE}/TEST-0006-run.log 2>&1;echo $?
82+
pg_arman backup -B ${BACKUP_PATH} -b ptrack -p ${TEST_PGPORT} -d postgres --verbose >> ${TEST_BASE}/TEST-0006-run.log 2>&1;echo $?
8383
pg_arman validate -B ${BACKUP_PATH} >> ${TEST_BASE}/TEST-0006-run.log 2>&1
8484
pg_arman show -B ${BACKUP_PATH} > ${TEST_BASE}/TEST-0006.log 2>&1
8585
grep -c OK ${TEST_BASE}/TEST-0006.log

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy