pg_upgrade: diff cluster data after `make installcheck`
For installcheck, don't just diff the cluster schema before and after
upgrade, but dump and diff the data too. Smoke tests (`make check`)
remain unchanged; they will only compare master schemas.
@@ -21,6 +21,8 @@ NEW_DATADIR=
DEMOCLUSTER_OPTS=
PGUPGRADE_OPTS=
+DUMP_OPTS=
+
# The normal ICW run has a gpcheckcat call, so allow this testrunner to skip
# running it in case it was just executed to save time.
gpcheckcat=1
@@ -30,10 +32,10 @@ gpcheckcat=1
# a failure.
mirrors=0
-# Smoketesting pg_upgrade is done by just upgrading the QD without diffing the
-# results. This is *NOT* a test of whether pg_upgrade can successfully upgrade
-# a cluster but a test intended to catch when objects aren't properly handled
-# in pg_dump/pg_upgrade wrt Oid synchronization
+# Smoketesting pg_upgrade is done by just upgrading the QD and checking the
+# resulting schema. This is *NOT* a test of whether pg_upgrade can successfully
+# upgrade a cluster but a test intended to catch when objects aren't properly
+# handled in pg_dump/pg_upgrade wrt Oid synchronization
smoketest=0
# For debugging purposes it can be handy to keep the temporary directory around
@@ -207,7 +209,7 @@ diff_and_exit() {
gpstart -a ${args}
echo -n 'Dumping database schema after upgrade... '
- PGOPTIONS="${pgopts}" ${NEW_BINDIR}/pg_dumpall --schema-only -f "$temp_root/dump2.sql"
+ PGOPTIONS="${pgopts}" ${NEW_BINDIR}/pg_dumpall ${DUMP_OPTS} -f "$temp_root/dump2.sql"
echo done
gpstop -a ${args}
@@ -247,6 +249,7 @@ while getopts ":o:b:sCkKmr" opt; do
;;
s )
smoketest=1
+ DUMP_OPTS+=' --schema-only'
;;
C )
gpcheckcat=0
@@ -327,7 +330,7 @@ if (( $gpcheckcat )) ; then
fi
echo -n 'Dumping database schema before upgrade... '
-${NEW_BINDIR}/pg_dumpall --schema-only -f "$temp_root/dump1.sql"
+${NEW_BINDIR}/pg_dumpall ${DUMP_OPTS} -f "$temp_root/dump1.sql"
echo done
gpstop -a
