Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit eb9812f

Browse files
committed
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
1 parent f03a9ca commit eb9812f

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/bin/pg_upgrade/test.sh

+2-8
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ unset MAKELEVEL
2222
standard_initdb() {
2323
# To increase coverage of non-standard segment size and group access
2424
# without increasing test runtime, run these tests with a custom setting.
25-
"$1" -N --wal-segsize 1 -g
25+
# Also, specify "-A trust" explicitly to suppress initdb's warning.
26+
"$1" -N --wal-segsize 1 -g -A trust
2627
if [ -n "$TEMP_CONFIG" -a -r "$TEMP_CONFIG" ]
2728
then
2829
cat "$TEMP_CONFIG" >> "$PGDATA/postgresql.conf"
@@ -150,9 +151,6 @@ done
150151
EXTRA_REGRESS_OPTS="$EXTRA_REGRESS_OPTS --port=$PGPORT"
151152
export EXTRA_REGRESS_OPTS
152153

153-
# enable echo so the user can see what is being executed
154-
set -x
155-
156154
standard_initdb "$oldbindir"/initdb
157155
"$oldbindir"/pg_ctl start -l "$logdir/postmaster1.log" -o "$POSTMASTER_OPTS" -w
158156

@@ -256,10 +254,6 @@ esac
256254
pg_dumpall --no-sync -f "$temp_root"/dump2.sql || pg_dumpall2_status=$?
257255
pg_ctl -m fast stop
258256

259-
# no need to echo commands anymore
260-
set +x
261-
echo
262-
263257
if [ -n "$pg_dumpall2_status" ]; then
264258
echo "pg_dumpall of post-upgrade database cluster failed"
265259
exit 1

0 commit comments

Comments
 (0)