aboutsummaryrefslogtreecommitdiff
path: root/contrib/pg_upgrade/test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/pg_upgrade/test.sh')
-rw-r--r--contrib/pg_upgrade/test.sh9
1 files changed, 4 insertions, 5 deletions
diff --git a/contrib/pg_upgrade/test.sh b/contrib/pg_upgrade/test.sh
index 9fa0397790c..21a44b4b449 100644
--- a/contrib/pg_upgrade/test.sh
+++ b/contrib/pg_upgrade/test.sh
@@ -25,6 +25,8 @@ case $testhost in
*) LISTEN_ADDRESSES="" ;;
esac
+POSTMASTER_OPTS="-F -c listen_addresses=$LISTEN_ADDRESSES"
+
temp_root=$PWD/tmp_check
if [ "$1" = '--install' ]; then
@@ -84,16 +86,13 @@ PGSERVICE=""; unset PGSERVICE
PGSSLMODE=""; unset PGSSLMODE
PGREQUIRESSL=""; unset PGREQUIRESSL
PGCONNECT_TIMEOUT=""; unset PGCONNECT_TIMEOUT
+PGHOST=""; unset PGHOST
PGHOSTADDR=""; unset PGHOSTADDR
-# Select a port number and socket directory, similarly to pg_regress.c
+# Select a non-conflicting port number, similarly to pg_regress.c
PG_VERSION_NUM=`grep '#define PG_VERSION_NUM' $newsrc/src/include/pg_config.h | awk '{print $3}'`
PGPORT=`expr $PG_VERSION_NUM % 16384 + 49152`
export PGPORT
-PGHOST=${PG_REGRESS_SOCK_DIR-$PGDATA}
-export PGHOST
-
-POSTMASTER_OPTS="-F -c listen_addresses=$LISTEN_ADDRESSES -k \"$PGHOST\""
i=0
while psql -X postgres </dev/null 2>/dev/null