Skip to content

Commit 4b74da7

Browse files
authored
chore: stop postgresql restart during upgrades (#790)
1 parent 4f42b9f commit 4b74da7

File tree

1 file changed

+4
-1
lines changed
  • ansible/files/admin_api_scripts/pg_upgrade_scripts

1 file changed

+4
-1
lines changed

ansible/files/admin_api_scripts/pg_upgrade_scripts/initiate.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ cleanup() {
9595

9696
if [ "$IS_DRY_RUN" = false ]; then
9797
echo "Restarting postgresql"
98-
systemctl restart postgresql
98+
systemctl enable postgresql
99+
retry 5 systemctl restart postgresql
99100
fi
100101

101102
echo "Re-enabling extensions"
@@ -299,6 +300,8 @@ EOF
299300
UPGRADE_COMMAND="$UPGRADE_COMMAND --check"
300301
else
301302
echo "9. Stopping postgres; running pg_upgrade"
303+
retry 5 systemctl restart postgresql
304+
systemctl disable postgresql
302305
retry 5 systemctl stop postgresql
303306
fi
304307

0 commit comments

Comments
 (0)