Re: BUG #18625: user-created extensions change ownership to "postgres" after upgrade

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #18625: user-created extensions change ownership to "postgres" after upgrade
Дата
Msg-id 2464496.1726853783@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #18625: user-created extensions change ownership to "postgres" after upgrade  (Evgeni Golov <evgeni@golov.de>)
Список pgsql-bugs
Evgeni Golov <evgeni@golov.de> writes:
> On Fri, Sep 20, 2024 at 12:18:00PM GMT, Tom Lane wrote:
>> You could do that as superuser, but it's not really enough because
>> there are pg_shdepend entries that ought to be added/updated.

> What happens if those (pg_shdepend.refobjid, pg_extension.extowner)
> are/get out of sync?

Stuff like DROP OWNED BY will misbehave, because it won't detect that
that extension belongs to that role.

>> The bigger picture here is that it's not just the pg_extension object
>> whose ownership is at stake.  There are going to be objects belonging
>> to the extension that probably --- but not certainly --- should have
>> the same owner as the extension.

> Is there a way to find/list those related objects?

Sure, \dx+ in psql, or look in pg_depend for 'e' dependencies.

            regards, tom lane



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