Skip to content
Snippets Groups Projects
Commit 5d91a9e8 authored by Andres Freund's avatar Andres Freund
Browse files

pg_upgrade: Make test.sh's installcheck use to-be-upgraded version's bindir.

On master (after 700538) the old version's installed psql was used -
even when the old version might not actually be installed / might be
installed into a temporary directory. As commonly the case when just
executing make check for pg_upgrade, as $oldbindir is just the current
version's $bindir.

In the back branches, with --install specified, psql from the new
version's temporary installation was used, without --install (e.g for
NO_TEMP_INSTALL, cf 47b3c266), the new version's installed psql was
used (which might or might not exist).

Author: Andres Freund
Discussion: https://postgr.es/m/20190522175150.c26f4jkqytahajdg@alap3.anarazel.de
parent f7da492d
No related branches found
No related tags found
No related merge requests found
...@@ -86,14 +86,6 @@ if [ "$1" = '--install' ]; then ...@@ -86,14 +86,6 @@ if [ "$1" = '--install' ]; then
SHLIB_PATH=$libdir:$SHLIB_PATH SHLIB_PATH=$libdir:$SHLIB_PATH
export SHLIB_PATH export SHLIB_PATH
PATH=$libdir:$PATH PATH=$libdir:$PATH
# We need to make it use psql from our temporary installation,
# because otherwise the installcheck run below would try to
# use psql from the proper installation directory, which might
# be outdated or missing. But don't override anything else that's
# already in EXTRA_REGRESS_OPTS.
EXTRA_REGRESS_OPTS="$EXTRA_REGRESS_OPTS --bindir='$bindir'"
export EXTRA_REGRESS_OPTS
fi fi
: ${oldbindir=$bindir} : ${oldbindir=$bindir}
...@@ -102,6 +94,14 @@ fi ...@@ -102,6 +94,14 @@ fi
oldsrc=`cd "$oldsrc" && pwd` oldsrc=`cd "$oldsrc" && pwd`
newsrc=`cd ../../.. && pwd` newsrc=`cd ../../.. && pwd`
# We need to make pg_regress use psql from the desired installation
# (likely a temporary one), because otherwise the installcheck run
# below would try to use psql from the proper installation directory
# of the target version, which might be outdated or not exist. But
# don't override anything else that's already in EXTRA_REGRESS_OPTS.
EXTRA_REGRESS_OPTS="$EXTRA_REGRESS_OPTS --bindir='$oldbindir'"
export EXTRA_REGRESS_OPTS
PATH=$bindir:$PATH PATH=$bindir:$PATH
export PATH export PATH
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment