Re: BUG #17062: Assert failed in RemoveRoleFromObjectPolicy() on DROP OWNED policy applied to duplicate role

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Stephen Frost <sfrost(at)snowman(dot)net>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, exclusion(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17062: Assert failed in RemoveRoleFromObjectPolicy() on DROP OWNED policy applied to duplicate role
Date: 2021-06-23 00:20:31
Message-ID: YNJ+T+w/z7pwH8sc@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, Jun 22, 2021 at 11:10:42AM -0400, Tom Lane wrote:
> I hadn't intended to mess with that, since the main point of this
> patch was just to get rid of unnecessary code. It could be done as a
> follow-on micro-optimization, if you like. You'd need to be sure
> that the new coding gets rid of duplicate pg_shdepend entries if there
> are any.

Okay. There is no urgency in that. You mentioned it, so I was just
wondering about it.

> Just that if you wanted to add some new roles to the same policy,
> you wouldn't have to remember the rest of the policy's details.

At the same time, nobody has complained about the current behavior
either, and what HEAD does now is the same behavior as one would have
for any objects using SHARED_DEPENDENCY_OWNER which is what DROP OWNED
BY ensures. So the existing forced deletion seems better kept as-is.
--
Michael

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2021-06-23 00:33:47 Re: BUG #17064: Parallel VACUUM operations cause the error "global/pg_filenode.map contains incorrect checksum"
Previous Message Alexander Lakhin 2021-06-22 17:00:04 Re: BUG #17064: Parallel VACUUM operations cause the error "global/pg_filenode.map contains incorrect checksum"