Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Make pg_upgrade's test.sh less chatty.
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 22 Jul 2019 21:14:22 +0000 (17:14 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 22 Jul 2019 21:14:22 +0000 (17:14 -0400)
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 eb9812f27 into all active branches.

Discussion: https://postgr.es/m/21766.1558397960@sss.pgh.pa.us
Discussion: https://postgr.es/m/20190722193459.GA14241@alvherre.pgsql

src/bin/pg_upgrade/test.sh

index 58e09af3a5add0d5b0df6ac890d97e1b4b92cc01..35e84f8e8c7dab1a81c154dc4f4b032a36c70a45 100644 (file)
@@ -20,7 +20,8 @@ unset MAKELEVEL
 # Run a given "initdb" binary and overlay the regression testing
 # authentication configuration.
 standard_initdb() {
-   "$1" -N
+   # Specify "-A trust" explicitly to suppress initdb's warning.
+   "$1" -N -A trust
    if [ -n "$TEMP_CONFIG" -a -r "$TEMP_CONFIG" ]
    then
        cat "$TEMP_CONFIG" >> "$PGDATA/postgresql.conf"
@@ -158,9 +159,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
 
@@ -232,10 +230,6 @@ esac
 pg_dumpall -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