提交 4a882635 编写于 作者: D Daniel Gustafsson 提交者: Jacob Champion

Fix vacuum check in pg_upgrade testing

Make sure we use the psql client from the new bindir (the on in PATH
might well be an upstream postgres psql etc), and use a port different
from the standard postgres port since it's likely to be in use.

Also fix integer value comparison which caused a warning in my Bash,
while it might work in other versions of Bash.

(cherry picked from commit 743aa9ba)
上级 d301479a
......@@ -73,14 +73,14 @@ check_vacuum_worked()
# Start the instance using the same pg_ctl invocation used by pg_upgrade.
"${NEW_BINDIR}/pg_ctl" -w -l /dev/null -D "${datadir}" \
-o "-p 5432 --gp_dbid=1 --gp_num_contents_in_cluster=0 --gp_contentid=${contentid} --xid_warn_limit=10000000 -b" \
-o "-p 18432 --gp_dbid=1 --gp_num_contents_in_cluster=0 --gp_contentid=${contentid} --xid_warn_limit=10000000 -b" \
start
# Query for the xmin ages.
local xmin_ages=$( \
PGOPTIONS='-c gp_session_role=utility' \
psql -c 'SELECT age(xmin) FROM pg_catalog.gp_segment_configuration GROUP BY age(xmin);' \
-p 5432 -t -A template1 \
"${NEW_BINDIR}/psql" -c 'SELECT age(xmin) FROM pg_catalog.gp_segment_configuration GROUP BY age(xmin);' \
-p 18432 -t -A template1 \
)
# Stop the instance.
......@@ -88,7 +88,7 @@ check_vacuum_worked()
# Check to make sure all the xmins are frozen (maximum age).
while read age; do
if [ "$age" -ne 2147483647 ]; then
if [ "$age" -ne "2147483647" ]; then
echo "ERROR: gp_segment_configuration has an entry of age $age"
return 1
fi
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册