File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
ansible/files/admin_api_scripts/pg_upgrade_scripts Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -120,20 +120,22 @@ cleanup() {
120120 CI_start_postgres
121121 fi
122122
123+ retry 8 pg_isready -h localhost -U supabase_admin
124+
123125 echo " Re-enabling extensions"
124126 if [ -f $POST_UPGRADE_EXTENSION_SCRIPT ]; then
125- run_sql -f $POST_UPGRADE_EXTENSION_SCRIPT
127+ retry 5 run_sql -f $POST_UPGRADE_EXTENSION_SCRIPT
126128 fi
127129
128130 echo " Removing SUPERUSER grant from postgres"
129- run_sql -c " ALTER USER postgres WITH NOSUPERUSER;"
131+ retry 5 run_sql -c " ALTER USER postgres WITH NOSUPERUSER;"
130132
131133 echo " Resetting postgres database connection limit"
132- run_sql -c " ALTER DATABASE postgres CONNECTION LIMIT -1;"
134+ retry 5 run_sql -c " ALTER DATABASE postgres CONNECTION LIMIT -1;"
133135
134136 if [ -z " $IS_CI " ] && [ -z " $IS_LOCAL_UPGRADE " ]; then
135137 echo " Unmounting data disk from ${MOUNT_POINT} "
136- umount $MOUNT_POINT
138+ retry 3 umount $MOUNT_POINT
137139 fi
138140 echo " $UPGRADE_STATUS " > /tmp/pg-upgrade-status
139141
You can’t perform that action at this time.
0 commit comments