Re: [BUGS] BUG #14456: pg_dump doesn't restore permissions on tables belonging to an extension

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [BUGS] BUG #14456: pg_dump doesn't restore permissions on tables belonging to an extension
Дата
Msg-id 12559.1484247701@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [BUGS] BUG #14456: pg_dump doesn't restore permissions on tablesbelonging to an extension  (Moshe Jacobson <moshe@neadwerx.com>)
Ответы Re: [BUGS] BUG #14456: pg_dump doesn't restore permissions on tablesbelonging to an extension  (Moshe Jacobson <moshe@neadwerx.com>)
Re: [BUGS] BUG #14456: pg_dump doesn't restore permissions on tablesbelonging to an extension  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-bugs
Moshe Jacobson <moshe@neadwerx.com> writes:
> Scenario:

>    1. Extension is installed into its own schema. Installation is now
>    complete.
>    2. Extension creates a new table in its schema
>    3. Extension changes ACLs on the table.

Extensions are not actors, so claiming that "the extension" did something
is at best pretty fuzzy thinking.

>    4. After changing ACLs, the table is added to the extension (ALTER
>    EXTENSION)
>    5. A pg_dump of this database will now include ACL commands for the
>    table.

Hmm.  There's an argument to be made that ALTER EXTENSION ADD should
absorb whatever the object's current ACLs are into the pg_init_privs
entries for the extension.  (I don't think it does that now, though
I might be wrong.)  However ...

>    6. A pg_restore of this file will give warnings because the ACLs refer
>    to a table that is not created as part of the installation process.

I think this scenario is simply pilot error, or at least gross abuse of
the extension system.  If you dump and reload a DB containing an extension,
the extension definition that's fetched by CREATE EXTENSION is expected
to define (at least) all the objects that belonged to the extension in the
old DB.  You can't just randomly ALTER EXTENSION and not update the
extension definition script to match.

            regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Moshe Jacobson
Дата:
Сообщение: Re: [BUGS] BUG #14456: pg_dump doesn't restore permissions on tablesbelonging to an extension
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: [BUGS] BUG #14456: pg_dump doesn't restore permissions on tablesbelonging to an extension