From 59bcd29cbb47998f304e02c5d4fe2c8cf5d4590e Mon Sep 17 00:00:00 2001 From: "ljf (zamentur)" Date: Thu, 12 Jan 2023 23:13:06 +0100 Subject: [PATCH] [fix] Postgresql migration could not stop old cluster, please do that manually --- src/migrations/0023_postgresql_11_to_13.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/migrations/0023_postgresql_11_to_13.py b/src/migrations/0023_postgresql_11_to_13.py index f0128da0b..91e1e9bf9 100644 --- a/src/migrations/0023_postgresql_11_to_13.py +++ b/src/migrations/0023_postgresql_11_to_13.py @@ -58,7 +58,8 @@ class MyMigration(Migration): "LC_ALL=C pg_dropcluster --stop 13 main || true" ) # We do not trigger an exception if the command fails because that probably means cluster 13 doesn't exists, which is fine because it's created during the pg_upgradecluster) time.sleep(3) - self.runcmd("LC_ALL=C pg_upgradecluster -m upgrade 11 main") + self.runcmd("LC_ALL=C pg_upgradecluster -m upgrade 11 main || true") + time.sleep(3) self.runcmd("LC_ALL=C pg_dropcluster --stop 11 main") self.runcmd("systemctl start postgresql")