Skip to content

Commit 40fb356

Browse files
author
otsuka.knj@gmail.com
committed
Fix some regression test issues.
git-svn-id: http://pg-rman.googlecode.com/svn/trunk@76 182aca00-e38e-11de-a668-6fd11605f5ce
1 parent 068280f commit 40fb356

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

sql/backup_restore.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ while [ $# -gt 0 ]; do
5151
esac
5252
done
5353

54+
export LANG=C
55+
5456
# delete old database cluster
5557
pg_ctl stop -m immediate > /dev/null 2>&1
5658
rm -rf $PGDATA
@@ -138,7 +140,7 @@ pg_rman -w -p $TEST_PGPORT backup -b i --verbose -d postgres > $BASE_PATH/result
138140
# validate all backup
139141
pg_rman validate `date +%Y` --verbose > $BASE_PATH/results/log_validate1 2>&1
140142
pg_rman -p $TEST_PGPORT show `date +%Y` -a --verbose -d postgres > $BASE_PATH/results/log_show0 2>&1
141-
pg_dumpall > $BASE_PATH/results/dump_before_rtx.sql
143+
pg_dumpall -p $TEST_PGPORT > $BASE_PATH/results/dump_before_rtx.sql
142144
target_xid=`psql -p $TEST_PGPORT pgbench -tAq -c "INSERT INTO pgbench_history VALUES (1) RETURNING(xmin);"`
143145
psql -p $TEST_PGPORT postgres -c "checkpoint"
144146
#pg_rman -p $TEST_PGPORT backup -b i --verbose -d postgres > $BASE_PATH/results/log_incr2 2>&1
@@ -156,7 +158,7 @@ sleep `expr $DURATION / 2`
156158
pg_ctl stop -m immediate > /dev/null 2>&1
157159
cp -rp $PGDATA $PGDATA.bak
158160
pg_ctl start -w -t 3600 > /dev/null 2>&1
159-
pg_dumpall > $BASE_PATH/results/dump_before.sql
161+
pg_dumpall -p $TEST_PGPORT > $BASE_PATH/results/dump_before.sql
160162

161163
# revert to crushed cluster
162164
pg_ctl stop > /dev/null 2>&1
@@ -211,7 +213,7 @@ find $BACKUP_PATH/backup/srvlog -type f | wc -l
211213
pg_ctl start -w -t 3600 > /dev/null 2>&1
212214

213215
# compare recovery results
214-
pg_dumpall > $BASE_PATH/results/dump_after.sql
216+
pg_dumpall -p $TEST_PGPORT > $BASE_PATH/results/dump_after.sql
215217
diff $BASE_PATH/results/dump_before.sql $BASE_PATH/results/dump_after.sql
216218

217219
# take a backup and delete backed up online files
@@ -254,7 +256,7 @@ grep -c "recovery_target_" $PGDATA/recovery.conf
254256
# recovery database
255257
pg_ctl start -w -t 3600 > /dev/null 2>&1
256258

257-
pg_dumpall > $BASE_PATH/results/dump_after_rtx.sql
259+
pg_dumpall -p $TEST_PGPORT > $BASE_PATH/results/dump_after_rtx.sql
258260
diff $BASE_PATH/results/dump_before_rtx.sql $BASE_PATH/results/dump_after_rtx.sql
259261

260262
# show timeline

0 commit comments

Comments
 (0)