aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2019-05-21 13:11:57 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2019-05-21 13:11:57 -0400
commiteb9812f272db8e93416831e5254569b76edf8264 (patch)
treea4370b9a8dcd6c48e5a9c95b2f56ac7cf90a6f23 /src
parentf03a9ca4366d064d89b7cf7ed75d4e43f2ed0667 (diff)
downloadpostgresql-eb9812f272db8e93416831e5254569b76edf8264.tar.gz
postgresql-eb9812f272db8e93416831e5254569b76edf8264.zip
Make pg_upgrade's test.sh less chatty.
The use of "set -x" to echo a subset of the test's commands might've been a good idea during development of this test, but it's been stable for long enough now that the extra output isn't very useful. Also our project expectations have been trending towards less output in non-error cases; the fact that "set -x" produces output on stderr is particularly annoying from that standpoint. So get rid of it. Also, pass "-A trust" to initdb explicitly so that it won't issue a warning about "trust" being an insecure default. This matches what the TAP tests have done for a long time, and again gets rid of some noise on stderr. Discussion: https://postgr.es/m/21766.1558397960@sss.pgh.pa.us
Diffstat (limited to 'src')
-rw-r--r--src/bin/pg_upgrade/test.sh10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/bin/pg_upgrade/test.sh b/src/bin/pg_upgrade/test.sh
index 66e69b946b4..598f4a1e11b 100644
--- a/src/bin/pg_upgrade/test.sh
+++ b/src/bin/pg_upgrade/test.sh
@@ -22,7 +22,8 @@ unset MAKELEVEL
standard_initdb() {
# To increase coverage of non-standard segment size and group access
# without increasing test runtime, run these tests with a custom setting.
- "$1" -N --wal-segsize 1 -g
+ # Also, specify "-A trust" explicitly to suppress initdb's warning.
+ "$1" -N --wal-segsize 1 -g -A trust
if [ -n "$TEMP_CONFIG" -a -r "$TEMP_CONFIG" ]
then
cat "$TEMP_CONFIG" >> "$PGDATA/postgresql.conf"
@@ -150,9 +151,6 @@ done
EXTRA_REGRESS_OPTS="$EXTRA_REGRESS_OPTS --port=$PGPORT"
export EXTRA_REGRESS_OPTS
-# enable echo so the user can see what is being executed
-set -x
-
standard_initdb "$oldbindir"/initdb
"$oldbindir"/pg_ctl start -l "$logdir/postmaster1.log" -o "$POSTMASTER_OPTS" -w
@@ -256,10 +254,6 @@ esac
pg_dumpall --no-sync -f "$temp_root"/dump2.sql || pg_dumpall2_status=$?
pg_ctl -m fast stop
-# no need to echo commands anymore
-set +x
-echo
-
if [ -n "$pg_dumpall2_status" ]; then
echo "pg_dumpall of post-upgrade database cluster failed"
exit 1