Some coverage for DROP OWNED BY with pg_default_acl - Mailing list pgsql-hackers

From Michael Paquier
Subject Some coverage for DROP OWNED BY with pg_default_acl
Date
Msg-id YAbQ1OD+3ip4lRv8@paquier.xyz
Whole thread Raw
Responses Re: Some coverage for DROP OWNED BY with pg_default_acl
List pgsql-hackers
Hi all,

I was looking again at the thread that reported a problem when using
ALTER DEFAULT PRIVILEGES with duplicated object names:
https://www.postgresql.org/message-id/ae2a7dc1-9d71-8cba-3bb9-e4cb7eb1f44e@hot.ee

And while reviewing the thing, I have spotted that there is a specific
path for pg_default_acl in RemoveRoleFromObjectACL() that has zero
coverage.  This can be triggered with DROP OWNED BY, and it is
actually safe to run as long as this is done in a separate transaction
to avoid any interactions with parallel regression sessions.
privileges.sql already has similar tests, so I'd like to add some
coverage as per the attached (the duplicated role name is wanted).

Thoughts?
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: "Joel Jacobson"
Date:
Subject: Re: Add primary keys to system catalogs
Next
From: Daniel Gustafsson
Date:
Subject: Re: Online checksums patch - once again