Skip to content

Commit aff70a8

Browse files
committed
fix: only grant pg_read_all_data if it exists
1 parent 3db2f70 commit aff70a8

File tree

1 file changed

+8
-1
lines changed
  • ansible/files/admin_api_scripts/pg_upgrade_scripts

1 file changed

+8
-1
lines changed

ansible/files/admin_api_scripts/pg_upgrade_scripts/common.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,14 @@ $$;
530530
alter 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
535542
set session authorization supabase_admin;
536543
drop role supabase_tmp;

0 commit comments

Comments
 (0)