Re: REASSIGN OWNED BY alters objects in other database.
| От | Andrey Borodin |
|---|---|
| Тема | Re: REASSIGN OWNED BY alters objects in other database. |
| Дата | |
| Msg-id | B5E2328B-7759-4EF9-9541-256F955C8895@yandex-team.ru обсуждение исходный текст |
| Ответ на | Re: REASSIGN OWNED BY alters objects in other database. (Kirill Reshke <reshkekirill@gmail.com>) |
| Список | pgsql-hackers |
> On 2 Jan 2026, at 01:41, Kirill Reshke <reshkekirill@gmail.com> wrote: > > I can see that REASSIGN owned will behave the way I want if the `dbid` > column in pg_shdepend would be non-zero for record with deptype = 'o' > (owner). > This would automatically drop only subscriptions from the current > database. But we create this record with dbid = 0 because of > shdepAddDependency, which thinks that classId is a shared relation > then dependency should have dbid = 0. I wonder if this is correct (for > subscriptions case). > > If it is, then your patch WFM LGTM. After considering your approach a bit more, I started to think that what you propose might be a better option for masterbranch. While looking up into pg_subscription is much easier to backpatch, making dbid real in pg_shdepend might be more future proof. But there might be some consequences that I do not understand now. Best regards, Andrey Borodin.
В списке pgsql-hackers по дате отправления: