pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephen Frost <sfrost@snowman.net>
To: Aleš Zelený <zeleny.ales@gmail.com>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Subject: Re: Invalid dump file after drop of role that previously created extension containing a table.
Date: Thu, 21 Sep 2023 15:30:37 -0400
Message-ID: <ZQyZ3QOOs0BlWGyf@tamriel.snowman.net> (raw)
In-Reply-To: <CAODqTUZSHn=7HWUGjqnQa5f58jKoh=ee9h=1_LrdLiQ5XT3Hvg@mail.gmail.com>
References: <CAODqTUZSHn=7HWUGjqnQa5f58jKoh=ee9h=1_LrdLiQ5XT3Hvg@mail.gmail.com>

Greetings,

* Aleš Zelený (zeleny.ales@gmail.com) wrote:
> Testcase description:
> ====================
> 1) An extension (I've used pg_cron as an example because it contains a
> table) is created by a database user (login role), and the initial
> privileges at extension creation are stored for the extension object
> (table in my test case) in the pg_catalog.pg_init_privs table.
> 2) Change the database user objects ownership from step 1 to another
> database user -> this step keeps the pg_catalog.pg_init_privs table
> content for the extension table from step 1 untouched.
> 3) Drop the database user used in step 1 and as its entry is deleted
> from the catalog, all that remains is the OID of the deleted database
> user in the pg_catalog.pg_init_privs table, later used by pg_dump.

Hrmpf.  Yeah, seems like if we're going to allow extensions and
extension objects to be impacted by REASSIGN OWNED and such then we need
to be sure to update pg_init_privs accordingly.  At least that's my
first thought seeing this.  Would welcome thoughts from others on this
though.

Thanks,

Stephen

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (4+ messages)  latest in thread

Message-ID: <ZQyZ3QOOs0BlWGyf@tamriel.snowman.net>
Permalink:  ../ZQyZ3QOOs0BlWGyf@tamriel.snowman.net/
Also on:    postgresql.org/message-id/ZQyZ3QOOs0BlWGyf@tamriel.snowman.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: sfrost@snowman.net, zeleny.ales@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: Invalid dump file after drop of role that previously created extension containing a table.
  In-Reply-To: <ZQyZ3QOOs0BlWGyf@tamriel.snowman.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox