From 918fcb9f6f4de4fb0e5491c7165f63f99de0c130 Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Sat, 27 Jun 2020 03:28:59 +0000 Subject: [PATCH] upgrade: Make upgrade-postgres work without systemctl. The only postgres cluster which need be stopped is the one we are upgrading. --- scripts/setup/upgrade-postgres | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/setup/upgrade-postgres b/scripts/setup/upgrade-postgres index d3ab32b317..62450e0084 100755 --- a/scripts/setup/upgrade-postgres +++ b/scripts/setup/upgrade-postgres @@ -24,16 +24,16 @@ if pg_lsclusters -h | grep -qE "^$UPGRADE_TO\s+main\b"; then fi # Work around `systemctl stop postgresql` being asynchronous, since -# the pg_upsgrdecluster command fails if it is still running +# the pg_upgradecluster command fails if it is still running # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=759725 -systemctl stop postgresql "postgresql@*" +pg_ctlcluster "$UPGRADE_FROM" main stop pg_upgradecluster "$UPGRADE_FROM" main crudini --set /etc/zulip/zulip.conf postgresql version "$UPGRADE_TO" touch "/usr/share/postgresql/$UPGRADE_TO/pgroonga_setup.sql.applied" "$ZULIP_PATH"/scripts/zulip-puppet-apply -f -systemctl restart memcached +service memcached restart pg_dropcluster "$UPGRADE_FROM" main apt remove -y "postgresql-$UPGRADE_FROM"