@@ -125,8 +125,11 @@ pgbench -p ${TEST_PGPORT} pgbench > /dev/null 2>&1
125
125
psql --no-psqlrc -p${TEST_PGPORT} -d pgbench -c" SELECT * FROM pgbench_branches;" > ${TEST_BASE} /TEST-0006-before.out
126
126
TARGET_XID=` psql --no-psqlrc -p${TEST_PGPORT} -d pgbench -tAq -c" INSERT INTO tbl0006 VALUES ('inserted') RETURNING (xmin);" `
127
127
pgbench -p${TEST_PGPORT} -d pgbench> /dev/null2>&1
128
- # Enforce segment to be archived to ensure that recovery goes well.
128
+ # Enforce segment to be archived to ensure that recovery goes up to the
129
+ # wanted point. There is no way to ensure that all segments needed have
130
+ # been archived up to the xmin point saved earlier without that.
129
131
psql --no-psqlrc -p${TEST_PGPORT} -d pgbench -c' SELECT pg_switch_xlog()' > /dev/null2>&1
132
+ # Fast mode is used to ensure that the last segment is archived as well.
130
133
pg_ctl stop -m fast> /dev/null2>&1
131
134
pg_arman restore -B${BACKUP_PATH} --recovery-target-xid=" ${TARGET_XID} " --quiet; echo $?
132
135
pg_ctl start -w -t 600> /dev/null2>&1
@@ -151,7 +154,11 @@ pgbench -p ${TEST_PGPORT} pgbench > /dev/null 2>&1
151
154
psql --no-psqlrc -p${TEST_PGPORT} -d pgbench -c" SELECT * FROM pgbench_branches;" > ${TEST_BASE} /TEST-0007-before.out
152
155
TARGET_XID=` psql --no-psqlrc -p${TEST_PGPORT} -d pgbench -tAq -c" INSERT INTO tbl0007 VALUES ('inserted') RETURNING (xmin);" `
153
156
pgbench -p${TEST_PGPORT} -d pgbench> /dev/null2>&1
157
+ # Enforce segment to be archived to ensure that recovery goes up to the
158
+ # wanted point. There is no way to ensure that all segments needed have
159
+ # been archived up to the xmin point saved earlier without that.
154
160
psql --no-psqlrc -p${TEST_PGPORT} -d pgbench -c' SELECT pg_switch_xlog()' > /dev/null2>&1
161
+ # Fast mode is used to ensure that the last segment is archived as well.
155
162
pg_ctl stop -m fast> /dev/null2>&1
156
163
pg_arman restore -B${BACKUP_PATH} --recovery-target-xid=" ${TARGET_XID} " --recovery-target-inclusive=false --quiet; echo $?
157
164
pg_ctl start -w -t 600> /dev/null2>&1