Re: pg_init_privs corruption. - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_init_privs corruption.
Date
Msg-id 2715293.1676659381@sss.pgh.pa.us
Whole thread Raw
In response to pg_init_privs corruption.  (Kirill Reshke <reshke@double.cloud>)
Responses RE: pg_init_privs corruption.
List pgsql-hackers
Kirill Reshke <reshke@double.cloud> writes:
> As you can see, after drop role there is invalid records in pg_init_privs
> system relation. After this, pg_dump generate sql statements, some of which
> are based on content of pg_init_privs, resulting in invalid dump.

Ugh.

> PFA fix.

I don't think this is anywhere near usable as-is, because it only
accounts for pg_init_privs entries in the current database.  We need
to handle these records in the DROP OWNED BY mechanism instead, and
also ensure there are shared-dependency entries for them so that the
role can't be dropped until the entries are gone in all DBs.  The real
problem may be less that DROP is doing the wrong thing, and more that
creation of the pg_init_privs entries neglects to record a dependency.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Justin Pryzby
Date:
Subject: Re: Move defaults toward ICU in 16?
Next
From: "Jonathan S. Katz"
Date:
Subject: Re: The output sql generated by pg_dump for a create function refers to a modified table name