File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
ansible/files/admin_api_scripts/pg_upgrade_scripts Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -91,6 +91,15 @@ swap_postgres_and_supabase_admin() {
91
91
alter database postgres connection limit 0;
92
92
select pg_terminate_backend(pid) from pg_stat_activity where backend_type = 'client backend' and pid != pg_backend_pid();
93
93
EOSQL
94
+
95
+ if [ -z " $IS_CI " ]; then
96
+ retry 5 systemctl restart postgresql
97
+ else
98
+ CI_start_postgres " "
99
+ fi
100
+
101
+ retry 8 pg_isready -h localhost -U supabase_admin
102
+
94
103
run_sql << 'EOSQL '
95
104
set statement_timeout = '600s';
96
105
begin;
Original file line number Diff line number Diff line change @@ -148,6 +148,14 @@ cleanup() {
148
148
}
149
149
150
150
function handle_extensions {
151
+ if [ -z " $IS_CI " ]; then
152
+ retry 5 systemctl restart postgresql
153
+ else
154
+ CI_start_postgres
155
+ fi
156
+
157
+ retry 8 pg_isready -h localhost -U supabase_admin
158
+
151
159
rm -f $POST_UPGRADE_EXTENSION_SCRIPT
152
160
touch $POST_UPGRADE_EXTENSION_SCRIPT
153
161
You can’t perform that action at this time.
0 commit comments