File tree 1 file changed +10
-3
lines changed
ansible/files/admin_api_scripts/pg_upgrade_scripts
1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -357,7 +357,7 @@ begin
357
357
, case when rec.grantee = 'postgres'::regrole then 'supabase_admin'
358
358
when rec.grantee = 'supabase_admin'::regrole then 'postgres'
359
359
when rec.grantee = 0 then 'public'
360
- else rec.grantee::regrole
360
+ else rec.grantee::regrole::text
361
361
end
362
362
));
363
363
end if;
@@ -383,7 +383,7 @@ begin
383
383
when obj->>'objtype' = 'T' then 'types'
384
384
when obj->>'objtype' = 'n' then 'schemas'
385
385
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
387
387
, case when rec.is_grantable then 'with grant option' else '' end
388
388
));
389
389
end if;
530
530
alter database postgres connection limit -1;
531
531
532
532
-- #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;
534
541
535
542
set session authorization supabase_admin;
536
543
drop role supabase_tmp;
You can’t perform that action at this time.
0 commit comments