From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Some coverage for DROP OWNED BY with pg_default_acl |
Date: | 2021-01-19 20:49:03 |
Message-ID: | 20210119204903.GA5891@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2021-Jan-19, Michael Paquier wrote:
> 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).
Heh, interesting case. Added coverage is good, so +1.
Since the role regress_priv_user2 is "private" to the privileges.sql
script, there's no danger of a concurrent test getting the added lines
in trouble AFAICS.
> +SELECT count(*) FROM pg_shdepend
> + WHERE deptype = 'a' AND
> + refobjid = 'regress_priv_user2'::regrole AND
> + classid = 'pg_default_acl'::regclass;
> + count
> +-------
> + 5
> +(1 row)
Shrug. Seems sufficient.
--
Álvaro Herrera Valdivia, Chile
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2021-01-19 20:54:38 | Re: [PATCH 1/1] Fix detection of pwritev support for OSX. |
Previous Message | Robert Haas | 2021-01-19 20:45:03 | Re: [Patch] ALTER SYSTEM READ ONLY |