We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent3f62e63 commit4abedc3Copy full SHA for 4abedc3
src/pgpro-upgrade/pgpro_upgrade
@@ -32,6 +32,8 @@ esac
32
# Check the catalog version
33
CATALOG_VERSION_NO=2016081311
34
MAJORVER=9.6
35
+# catalog version upgrade supported from. Space-separated list
36
+UPGRADABLE_CATVER="201608131"
37
if [!-f"${PGDATA}/global/pg_control"-a-f"${PGDATA}/postgresql.conf" ];then
38
# looks like we have Debian with separate directory for configs
39
SAVE_PGDATA="$PGDATA"
@@ -45,6 +47,17 @@ if [ ! -f "${PGDATA}/global/pg_control" -a -f "${PGDATA}/postgresql.conf" ]; the
45
47
fi
46
48
CATVER=`${PGBIN}pg_controldata|sed -n'/Catalog version number:/s/^.*: *//p'`
49
if ["$CATVER"!=$CATALOG_VERSION_NO ];then
50
+forvin$UPGRADABLE_CATVER;do
51
+if ["$CATVER"="$v" ];then
52
+upgrade_possible=1
53
+break
54
+fi
55
+done
56
+if [-z"$upgrade_possible" ];then
57
+echo"Upgrade of$PGDATA from catalog version '$CATVER' is not supported">&2
58
+exit 2
59
60
+
61
if [-n"$check" ];then
62
echo"Database needs upgrade"
63
exit 1