Skip to content

Commit

Permalink
chore: wait a few seconds before an additional psql stop during upgra…
Browse files Browse the repository at this point in the history
…des (#805)
  • Loading branch information
pcnc authored Nov 27, 2023
1 parent 7c8ed2f commit d090a1d
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -300,9 +300,15 @@ EOF
UPGRADE_COMMAND="$UPGRADE_COMMAND --check"
else
echo "9. Stopping postgres; running pg_upgrade"

# Extra work to ensure postgres is actually stopped
# Mostly needed for PG12 projects with odd systemd unit behavior
retry 5 systemctl restart postgresql
systemctl disable postgresql
retry 5 systemctl stop postgresql

sleep 3
systemctl stop postgresql
fi

su -c "$UPGRADE_COMMAND" -s "$SHELL" postgres
Expand Down

0 comments on commit d090a1d

Please sign in to comment.