[postgis-tickets] [SCM] PostGIS branch master updated. 3.2.0-448-g62aee6f13

git at osgeo.org git at osgeo.org
Tue Feb 1 06:18:29 PST 2022


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".

The branch, master has been updated
       via  62aee6f13c910d5bd221c255bd34bd74cc0e04ef (commit)
      from  cd088252f43d41ca36d391f4a54b4de0ef216c89 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 62aee6f13c910d5bd221c255bd34bd74cc0e04ef
Author: Sandro Santilli <strk at kbt.io>
Date:   Tue Feb 1 14:27:43 2022 +0100

    Fix and improve check_cluster_upgrade script

diff --git a/utils/check_cluster_upgrade.sh b/utils/check_cluster_upgrade.sh
index adb8cd73a..56b204be8 100755
--- a/utils/check_cluster_upgrade.sh
+++ b/utils/check_cluster_upgrade.sh
@@ -6,7 +6,7 @@ LOGFILE=${TMPDIR}/log
 INIT_SCRIPT=
 export PGPORT=15432
 export PGHOST=${TMPDIR}
-export PGDATABASE=pgis
+export PGDATABASE=postgis_cluster_upgrade_test
 PG_CONFIG_OLD=
 PG_CONFIG_NEW=
 
@@ -15,9 +15,10 @@ usage() {
 }
 
 cleanup() {
-  if test -f ${DATADIR}/cluster/postmaster.pid; then
-    ${BIN_OLD}/pg_ctl -D ${DATADIR} stop
-  fi
+  echo "-- Cleaning up --"
+  echo "Stopping postmaster on ${DATADIR} up"
+  ${BIN_OLD}/pg_ctl -D ${DATADIR} stop
+  echo "Removing ${TMPDIR}"
   rm -rf ${TMPDIR}
 }
 
@@ -78,13 +79,13 @@ ${BIN_OLD}/pg_ctl -D ${DATADIR} -o "-F -p ${PGPORT} -k ${TMPDIR}" -l ${LOGFILE}
 }
 
 echo "Creating FROM db"
-${BIN_OLD}/createdb pgis || exit 1
+${BIN_OLD}/createdb ${PGDATABASE} || exit 1
 
-#TODO: run an custom script
+# run an custom script
 if test -n "$INIT_SCRIPT"; then
-  ${BIN_OLD}/psql -X --set ON_ERROR_STOP=1 -f "$INIT_SCRIPT" || exit 1
+  ${BIN_OLD}/psql -XAt --set ON_ERROR_STOP=1 -f "$INIT_SCRIPT" || exit 1
 else
-  ${BIN_OLD}/psql -Xc --set ON_ERROR_STOP=1 "CREATE EXTENSION postgis" || exit 1
+  ${BIN_OLD}/psql -XAt --set ON_ERROR_STOP=1 -c "CREATE EXTENSION postgis" || exit 1
 fi
 
 echo "---- OLD cluster info -------------------------"
@@ -125,10 +126,18 @@ ${BIN_NEW}/pg_ctl -D ${DATADIR} -o "-F -p ${PGPORT} -k ${TMPDIR}" -l ${LOGFILE}
 }
 
 echo "---- NEW cluster info -------------------------"
-${BIN_NEW}/psql -XAx <<EOF || exit 1
+${BIN_NEW}/psql -XAt <<EOF || exit 1
 SELECT version();
 SELECT postgis_full_version();
+EOF
+echo "-----------------------------------------------"
+
+
+echo "---- Extensions upgrade call -------------------"
+${BIN_NEW}/psql -XAt <<EOF || exit 1
 SELECT postgis_extensions_upgrade();
 SELECT postgis_full_version();
 EOF
 echo "-----------------------------------------------"
+
+# TODO: run some checks with --nocreate and appropriate PG

-----------------------------------------------------------------------

Summary of changes:
 utils/check_cluster_upgrade.sh | 27 ++++++++++++++++++---------
 1 file changed, 18 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list