[postgis-tickets] [SCM] PostGIS branch master updated. 3.1.0alpha2-100-g50b1e70
git at osgeo.org
git at osgeo.org
Tue Oct 27 15:02:35 PDT 2020
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 50b1e70b1a9d14b2e152dce4416247149ac3f77c (commit)
from c1b8d14d8900dc835fd5782f364364ffa963919e (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 50b1e70b1a9d14b2e152dce4416247149ac3f77c
Author: Sandro Santilli <strk at kbt.io>
Date: Tue Oct 27 23:01:50 2020 +0100
Check existence of init script, show upgrade dump log if any
diff --git a/utils/check_cluster_upgrade.sh b/utils/check_cluster_upgrade.sh
index 8b530a6..adb8cd7 100755
--- a/utils/check_cluster_upgrade.sh
+++ b/utils/check_cluster_upgrade.sh
@@ -15,7 +15,9 @@ usage() {
}
cleanup() {
- ${BIN_OLD}/pg_ctl -D ${DATADIR} stop || exit 1
+ if test -f ${DATADIR}/cluster/postmaster.pid; then
+ ${BIN_OLD}/pg_ctl -D ${DATADIR} stop
+ fi
rm -rf ${TMPDIR}
}
@@ -27,6 +29,12 @@ while test -n "$1"; do
if test "$1" = "-i"; then
shift
INIT_SCRIPT=$1
+ if test -f ${INIT_SCRIPT}; then
+ :
+ else
+ echo "${INIT_SCRIPT} is not a file" >&2
+ exit 1
+ fi
shift
elif test -z "$PG_CONFIG_OLD"; then
PG_CONFIG_OLD="$1"
@@ -102,7 +110,13 @@ ${BIN_NEW}/initdb ${PGDATANEW} > ${LOGFILE} 2>&1 || {
echo "Upgrading cluster"
cd ${TMPDIR}
${BIN_NEW}/pg_upgrade --link -b ${BIN_OLD} -B ${BIN_NEW} > ${LOGFILE} 2>&1 || {
- cat ${LOGFILE} && exit 1
+ cat ${LOGFILE}
+ DUMPLOG=$(grep 'pg_upgrade_dump.*log' ${LOGFILE} | cut -d'"' -f2)
+ if test -n "${DUMPLOG}"; then
+ echo "${DUMPLOG} follows:"
+ tail ${TMPDIR}/${DUMPLOG}
+ fi
+ exit 1
}
echo "Starting TO cluster"
-----------------------------------------------------------------------
Summary of changes:
utils/check_cluster_upgrade.sh | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list