Re: DROP OWNED BY fails to clean out pg_init_privs grants - Mailing list pgsql-hackers

From Robert Haas
Subject Re: DROP OWNED BY fails to clean out pg_init_privs grants
Date
Msg-id CA+TgmoY0N9F9qLcL06dwzyeJbW=+K6iNo5P-TBi5Jr6s=a81FA@mail.gmail.com
Whole thread Raw
In response to Re: DROP OWNED BY fails to clean out pg_init_privs grants  (Hannu Krosing <hannuk@google.com>)
List pgsql-hackers
On Tue, May 28, 2024 at 9:06 PM Hannu Krosing <hannuk@google.com> wrote:
> We should definitely also fix pg_dump, likely just checking that the
> role exists when generating REVOKE commands (may be a good practice
> for other cases too so instead of casting to ::regrole  do the actual
> join)
>
> ## here is the fix for pg_dump
>
> While flying to Vancouver I looked around in pg_dump code, and it
> looks like the easiest way to mitigate the dangling pg_init_priv
> entries is to replace the query in pg_dump with one that filters out
> invalid entries

+1 for this approach. I agree with Tom that fixing this in REVOKE is a
bad plan; REVOKE is used by way too many things other than pg_dump,
and the behavior change is not in general desirable.

--
Robert Haas
EDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: relfilenode statistics
Next
From: Ashutosh Bapat
Date:
Subject: Re: Logical Replication of sequences