Skip to content

Commit 7ac7bf5

Browse files
committed
Make pg_upgrade's test.sh less chatty.
Remove "set -x", and pass "-A trust" to initdb explicitly, to suppress almost all of the noise this script used to emit on stderr. Back-patch of commit eb9812f into all active branches. Discussion: https://postgr.es/m/21766.1558397960@sss.pgh.pa.us Discussion: https://postgr.es/m/20190722193459.GA14241@alvherre.pgsql
1 parent 0e1deaa commit 7ac7bf5

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/bin/pg_upgrade/test.sh

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ unset MAKELEVEL
2020
# Run a given "initdb" binary and overlay the regression testing
2121
# authentication configuration.
2222
standard_initdb() {
23-
"$1" -N
23+
# Specify "-A trust" explicitly to suppress initdb's warning.
24+
"$1" -N -A trust
2425
if [ -n "$TEMP_CONFIG" -a -r "$TEMP_CONFIG" ]
2526
then
2627
cat "$TEMP_CONFIG" >> "$PGDATA/postgresql.conf"
@@ -160,9 +161,6 @@ done
160161
EXTRA_REGRESS_OPTS="$EXTRA_REGRESS_OPTS --port=$PGPORT"
161162
export EXTRA_REGRESS_OPTS
162163

163-
# enable echo so the user can see what is being executed
164-
set -x
165-
166164
standard_initdb "$oldbindir"/initdb
167165
"$oldbindir"/pg_ctl start -l "$logdir/postmaster1.log" -o "$POSTMASTER_OPTS" -w
168166

@@ -248,10 +246,6 @@ esac
248246
pg_dumpall --no-sync -f "$temp_root"/dump2.sql || pg_dumpall2_status=$?
249247
pg_ctl -m fast stop
250248

251-
# no need to echo commands anymore
252-
set +x
253-
echo
254-
255249
if [ -n "$pg_dumpall2_status" ]; then
256250
echo "pg_dumpall of post-upgrade database cluster failed"
257251
exit 1

0 commit comments

Comments
 (0)