From 5e5478307a801ce546ccce525be29493ba98ff55 Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Wed, 31 Jul 2024 17:48:46 +0000 Subject: [PATCH] docs: Swap upgrade-postgresql steps with rebuilding the venv. As of 1f68726cb834, the upgrade-postgresql tool uses Python to connect to the database used by Django, and thus requires a working venv. There is no reason we cannot reinstall the venv with the old version of PostgreSQL; swap the steps. --- docs/production/upgrade.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/production/upgrade.md b/docs/production/upgrade.md index e3ea04c6e0..f8a015d80b 100644 --- a/docs/production/upgrade.md +++ b/docs/production/upgrade.md @@ -329,13 +329,7 @@ instructions for other supported platforms. currently installed version. But it's not important; the next step will re-install Zulip's configuration in any case. -4. As root, upgrade the database to the latest version of PostgreSQL: - - ```bash - /home/zulip/deployments/current/scripts/setup/upgrade-postgresql - ``` - -5. Next, we need to reinstall the current version of Zulip, which +4. Next, we need to reinstall the current version of Zulip, which among other things will recompile Zulip's Python module dependencies for your new version of Python and rewrite Zulip's full-text search indexes to work with the upgraded dictionary @@ -351,6 +345,12 @@ instructions for other supported platforms. able to navigate to its URL and confirm everything is working correctly. +5. As root, upgrade the database to the latest version of PostgreSQL: + + ```bash + /home/zulip/deployments/current/scripts/setup/upgrade-postgresql + ``` + ### Upgrading from Ubuntu 18.04 Bionic to 20.04 Focal 1. Upgrade your server to the latest Zulip `3.x` or `4.x` release (at @@ -382,13 +382,7 @@ instructions for other supported platforms. currently installed version. But it's not important; the next step will re-install Zulip's configuration in any case. -4. As root, upgrade the database to the latest version of PostgreSQL: - - ```bash - /home/zulip/deployments/current/scripts/setup/upgrade-postgresql - ``` - -5. Next, we need to reinstall the current version of Zulip, which +4. Next, we need to reinstall the current version of Zulip, which among other things will recompile Zulip's Python module dependencies for your new version of Python and rewrite Zulip's full-text search indexes to work with the upgraded dictionary @@ -404,6 +398,12 @@ instructions for other supported platforms. able to navigate to its URL and confirm everything is working correctly. +5. As root, upgrade the database to the latest version of PostgreSQL: + + ```bash + /home/zulip/deployments/current/scripts/setup/upgrade-postgresql + ``` + 6. Finally, Ubuntu 20.04 has a different version of the low-level glibc library, which affects how PostgreSQL orders text data (known as "collations"); this corrupts database indexes that rely on