Skip to content

Commit 8a91e43

Browse files
committed
Fix pgpro_upgrade in check mode
1 parent f425dd2 commit 8a91e43

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/pgpro-upgrade/pgpro_upgrade

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ CATALOG_VERSION_NO=2016081311
3232
MAJORVER=9.6
3333
CATVER=`${PGBIN}pg_controldata|sed -n '/Catalog version number:/s/^.*: *//p'`
3434
if [ "$CATVER" != $CATALOG_VERSION_NO ]; then
35+
if [ -n "$check" ]; then
36+
echo "Database needs upgrade"
37+
exit 1
38+
fi
3539
if [ ! -f "${PGDATA}/global/pg_control" ]; then
3640
# looks like we have Debian with separate directory for configs
3741
SAVE_PGDATA="$PGDATA"

0 commit comments

Comments
 (0)