Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: pgmq ownership #1362

Merged
merged 3 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
do $$
declare
extoid oid := (select oid from pg_extension where extname = 'pgmq');
r record;
begin
set local search_path = '';
update pg_extension set extowner = 'postgres'::regrole where extname = 'pgmq';
for r in (select * from pg_depend where refobjid = extoid) loop
if r.classid = 'pg_type'::regclass then
execute(format('alter type %s owner to postgres;', r.objid::regtype));
elsif r.classid = 'pg_proc'::regclass then
execute(format('alter function %s(%s) owner to postgres;', r.objid::regproc, pg_get_function_identity_arguments(r.objid)));
elsif r.classid = 'pg_class'::regclass then
execute(format('alter table %s owner to postgres;', r.objid::regclass));
else
raise exception 'error on pgmq after-create script: unexpected object type %', r.classid;
end if;
end loop;
end $$;
2 changes: 1 addition & 1 deletion common-nix.vars.pkr.hcl
Original file line number Diff line number Diff line change
@@ -1 +1 @@
postgres-version = "15.6.1.145"
postgres-version = "15.6.1.146"
Loading