Skip to content

Commit 26b97fb

Browse files
author
Michael Paquier
committed
Simplify regression test script for restore
The same condition was checked twice...
1 parent 8aa6b84 commit 26b97fb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sql/backup_restore.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ CUR_TLI=`pg_controldata | grep TimeLineID | awk '{print $4}'`
174174
pg_rman restore -! --verbose > $BASE_PATH/results/log_restore1_1 2>&1
175175
CUR_TLI_R=`grep "current timeline ID = " $BASE_PATH/results/log_restore1_1 | awk '{print $5}'`
176176
TARGET_TLI=`grep "target timeline ID = " $BASE_PATH/results/log_restore1_1 | awk '{print $5}'`
177-
if [ "$CUR_TLI" != "$CUR_TLI_R" -o "$CUR_TLI" != "$CUR_TLI_R" ]; then
177+
if [ "$CUR_TLI" != "$CUR_TLI_R" ]; then
178178
echo "failed: bad timeline ID" CUR_TLI=$CUR_TLI CUR_TLI_R=$CUR_TLI_R
179179
fi
180180

@@ -197,7 +197,7 @@ CUR_TLI=`pg_controldata | grep TimeLineID | awk '{print $4}'`
197197
pg_rman restore -! --verbose > $BASE_PATH/results/log_restore1_2 2>&1
198198
CUR_TLI_R=`grep "current timeline ID = " $BASE_PATH/results/log_restore1_2 | awk '{print $5}'`
199199
TARGET_TLI=`grep "target timeline ID = " $BASE_PATH/results/log_restore1_2 | awk '{print $5}'`
200-
if [ "$CUR_TLI" != "$CUR_TLI_R" -o "$CUR_TLI" != "$CUR_TLI_R" ]; then
200+
if [ "$CUR_TLI" != "$CUR_TLI_R" ]; then
201201
echo "failed: bad timeline ID" CUR_TLI=$CUR_TLI CUR_TLI_R=$CUR_TLI_R
202202
fi
203203

@@ -245,7 +245,7 @@ CUR_TLI=`pg_controldata | grep TimeLineID | awk '{print $4}'`
245245
pg_rman restore -! --recovery-target-xid $target_xid --recovery-target-inclusive false --verbose > $BASE_PATH/results/log_restore2 2>&1
246246
CUR_TLI_R=`grep "current timeline ID = " $BASE_PATH/results/log_restore2 | awk '{print $5}'`
247247
TARGET_TLI=`grep "target timeline ID = " $BASE_PATH/results/log_restore2 | awk '{print $5}'`
248-
if [ "$CUR_TLI" != "$CUR_TLI_R" -o "$CUR_TLI" != "$CUR_TLI_R" ]; then
248+
if [ "$CUR_TLI" != "$CUR_TLI_R" ]; then
249249
echo "failed: bad timeline ID" CUR_TLI=$CUR_TLI CUR_TLI_R=$CUR_TLI_R
250250
fi
251251
echo "# of recovery target option in recovery.conf"

0 commit comments

Comments
 (0)