Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

upgrade-postgresql: Ensure the new PostgreSQL is running.

Alex Vandiver62562eedf7df
diff --git a/scripts/setup/upgrade-postgresql b/scripts/setup/upgrade-postgresql
index 9f9cda2978d..daed4ee5e72 100755
--- a/scripts/setup/upgrade-postgresql
+++ b/scripts/setup/upgrade-postgresql
@@ -53,6 +53,9 @@ SCRIPTS_PATH=$(grep -o "/var/log/postgresql/pg_upgradecluster-$UPGRADE_FROM-$UPG
# our configuration immediately
crudini --set /etc/zulip/zulip.conf postgresql version "$UPGRADE_TO"
+# Make sure the new PostgreSQL is running
+pg_ctlcluster "$UPGRADE_TO" main start
+
# Update the statistics
su postgres -c "/usr/lib/postgresql/$UPGRADE_TO/bin/vacuumdb --all --analyze-only --jobs 10"