Re: incorrect pg_dump output due to not handling dropped rolescorrectly

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: incorrect pg_dump output due to not handling dropped rolescorrectly
Дата
Msg-id 20191118031059.GA1543@paquier.xyz
обсуждение исходный текст
Ответ на Re: incorrect pg_dump output due to not handling dropped rolescorrectly  (Floris Van Nee <florisvannee@Optiver.com>)
Ответы Re: incorrect pg_dump output due to not handling dropped rolescorrectly  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-bugs
On Sun, Nov 17, 2019 at 08:56:13PM +0000, Floris Van Nee wrote:
> As for the proper fix, indeed it looks like the 'drop role' needs to
> be taught to update pg_init_privs.

The dependencies related to the ACL entries exist in pg_shdepend
between the role and the revoked objects, and these get removed when
issuing DROP OWNED BY.  So it seems to me that the cleanup needs to
happen when issuing the DROP OWNED BY query, and not DROP ROLE.
Looking at the code, it seems to me that we should just patch
shdepDropOwned() to handle properly the removal of the role in ACL
objects in pg_init_privs for all the objects we are removing a
dependency on.  I am just diving into a patch..
--
Michael

Вложения

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

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #16122: segfault pg_detoast_datum (datum=0x0) at fmgr.c:1833 numrange query
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: incorrect pg_dump output due to not handling dropped rolescorrectly