Some coverage for DROP OWNED BY with pg_default_acl

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-01-19T12:30:12Z
Lists: pgsql-hackers

Attachments

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

Commits

  1. Add regression test for DROP OWNED BY with default ACLs