Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit71d019c

Browse files
author
Michael Paquier
committed
Avoid regression diffs generated by custom .psqlrc
This is done by using psql with --no-psqlrc mode in related test script.
1 parentbd75d08 commit71d019c

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

‎sql/backup_restore.sh

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ pg_ctl start -w -t 3600 > /dev/null 2>&1
106106

107107
# create tablespace and database for pgbench
108108
mkdir -p$TBLSPC_PATH/pgbench
109-
psql -p$TEST_PGPORT postgres<<EOF
109+
psql --no-psqlrc -p$TEST_PGPORT postgres<<EOF
110110
CREATE TABLESPACE pgbench LOCATION '$TBLSPC_PATH/pgbench';
111111
CREATE DATABASE pgbench TABLESPACE = pgbench;
112112
EOF
@@ -125,22 +125,22 @@ grep -c DELETED $BASE_PATH/results/log_show_d_1
125125
pgbench -p$TEST_PGPORT -i -s$SCALE pgbench>$BASE_PATH/results/pgbench.log2>&1
126126

127127
echo"full database backup"
128-
psql -p$TEST_PGPORT postgres -c"checkpoint"
128+
psql --no-psqlrc -p$TEST_PGPORT postgres -c"checkpoint"
129129
#pg_rman -p $TEST_PGPORT backup --verbose -d postgres > $BASE_PATH/results/log_full_1 2>&1
130130
pg_rman -w -p$TEST_PGPORT backup --verbose -d postgres>$BASE_PATH/results/log_full_12>&1
131131

132132
pgbench -p$TEST_PGPORT -T$DURATION -c 10 pgbench>>$BASE_PATH/results/pgbench.log2>&1
133133
echo"incremental database backup"
134-
psql -p$TEST_PGPORT postgres -c"checkpoint"
134+
psql --no-psqlrc -p$TEST_PGPORT postgres -c"checkpoint"
135135
#pg_rman -p $TEST_PGPORT backup -b i --verbose -d postgres > $BASE_PATH/results/log_incr1 2>&1
136136
pg_rman -w -p$TEST_PGPORT backup -b i --verbose -d postgres>$BASE_PATH/results/log_incr12>&1
137137

138138
# validate all backup
139139
pg_rman validate`date +%Y` --verbose>$BASE_PATH/results/log_validate12>&1
140140
pg_rman -p$TEST_PGPORT show`date +%Y` -a --verbose -d postgres>$BASE_PATH/results/log_show02>&1
141141
pg_dumpall>$BASE_PATH/results/dump_before_rtx.sql
142-
target_xid=`psql -p$TEST_PGPORT pgbench -tAq -c"INSERT INTO pgbench_history VALUES (1) RETURNING(xmin);"`
143-
psql -p$TEST_PGPORT postgres -c"checkpoint"
142+
target_xid=`psql --no-psqlrc -p$TEST_PGPORT pgbench -tAq -c"INSERT INTO pgbench_history VALUES (1) RETURNING(xmin);"`
143+
psql --no-psqlrc -p$TEST_PGPORT postgres -c"checkpoint"
144144
#pg_rman -p $TEST_PGPORT backup -b i --verbose -d postgres > $BASE_PATH/results/log_incr2 2>&1
145145
pg_rman -w -p$TEST_PGPORT backup -b i --verbose -d postgres>$BASE_PATH/results/log_incr22>&1
146146

@@ -217,7 +217,7 @@ diff $BASE_PATH/results/dump_before.sql $BASE_PATH/results/dump_after.sql
217217
# take a backup and delete backed up online files
218218
# incrementa backup can't find last full backup because new timeline started.
219219
echo"full database backup after recovery"
220-
psql -p$TEST_PGPORT postgres -c"checkpoint"
220+
psql --no-psqlrc -p$TEST_PGPORT postgres -c"checkpoint"
221221
#pg_rman -p $TEST_PGPORT backup -b f --verbose -d postgres > $BASE_PATH/results/log_full2 2>&1
222222
pg_rman -w -p$TEST_PGPORT backup -b f --verbose -d postgres>$BASE_PATH/results/log_full22>&1
223223

@@ -279,4 +279,3 @@ pg_rman -p $TEST_PGPORT show timeline `date +%Y` -a --verbose -d postgres > $BAS
279279

280280
# cleanup
281281
pg_ctl stop -m immediate> /dev/null2>&1
282-

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp