diff --git a/src/migrations/0023_postgresql_11_to_13.py b/src/migrations/0023_postgresql_11_to_13.py index 145f15558..8f03f8c5f 100644 --- a/src/migrations/0023_postgresql_11_to_13.py +++ b/src/migrations/0023_postgresql_11_to_13.py @@ -1,4 +1,5 @@ import subprocess +import time from moulinette import m18n from yunohost.utils.error import YunohostError, YunohostValidationError @@ -42,9 +43,11 @@ class MyMigration(Migration): ) self.runcmd("systemctl stop postgresql") + time.sleep(3) self.runcmd( "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_dropcluster --stop 11 main") self.runcmd("systemctl start postgresql")