Re: REASSIGN OWNED BY alters objects in other database.
| От | Andrey Borodin |
|---|---|
| Тема | Re: REASSIGN OWNED BY alters objects in other database. |
| Дата | |
| Msg-id | A8467D9A-11F1-49B5-8695-ED694B07601E@yandex-team.ru обсуждение исходный текст |
| Ответ на | Re: REASSIGN OWNED BY alters objects in other database. (Kirill Reshke <reshkekirill@gmail.com>) |
| Список | pgsql-hackers |
> On 1 Jan 2026, at 21:51, Álvaro Herrera <alvherre@kurilemu.de> wrote: > > <0001-REASSIGN-OWNED-ignore-subscriptions-in-other-databas.patch> I've took a look into that patch and it seems correct to me. > 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. I would be nice to add a regression test. Also, Álvaro correctly stated in commit message that same fix is needed for shdepDropOwned(). And, maybe, let's consider missing_ok parameter for API consistency in get_subscription_database()? Best regards, Andrey Borodin.
В списке pgsql-hackers по дате отправления: