File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
ansible/files/admin_api_scripts/pg_upgrade_scripts Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -357,7 +357,7 @@ begin
357357 , case when rec.grantee = 'postgres'::regrole then 'supabase_admin'
358358 when rec.grantee = 'supabase_admin'::regrole then 'postgres'
359359 when rec.grantee = 0 then 'public'
360- else rec.grantee::regrole
360+ else rec.grantee::regrole::text
361361 end
362362 ));
363363 end if;
@@ -383,7 +383,7 @@ begin
383383 when obj->>'objtype' = 'T' then 'types'
384384 when obj->>'objtype' = 'n' then 'schemas'
385385 end
386- , case when rec.grantee = 0 then 'public' else rec.grantee::regrole end
386+ , case when rec.grantee = 0 then 'public' else rec.grantee::regrole::text end
387387 , case when rec.is_grantable then 'with grant option' else '' end
388388 ));
389389 end if;
530530alter database postgres connection limit -1;
531531
532532-- #incident-2024-09-12-project-upgrades-are-temporarily-disabled
533- grant pg_read_all_data, pg_signal_backend to postgres;
533+ do $$
534+ begin
535+ if exists (select from pg_authid where rolname = 'pg_read_all_data') then
536+ execute('grant pg_read_all_data to postgres');
537+ end if;
538+ end
539+ $$;
540+ grant pg_signal_backend to postgres;
534541
535542set session authorization supabase_admin;
536543drop role supabase_tmp;
You can’t perform that action at this time.
0 commit comments