| From: | Andrey Borodin <x4mmm(at)yandex-team(dot)ru> |
|---|---|
| To: | Kirill Reshke <reshkekirill(at)gmail(dot)com> |
| Cc: | Álvaro Herrera <alvherre(at)kurilemu(dot)de>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: REASSIGN OWNED BY alters objects in other database. |
| Date: | 2026-01-05 09:04:54 |
| Message-ID: | A8467D9A-11F1-49B5-8695-ED694B07601E@yandex-team.ru |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
> On 1 Jan 2026, at 21:51, Álvaro Herrera <alvherre(at)kurilemu(dot)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(at)gmail(dot)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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | David Rowley | 2026-01-05 09:16:28 | Re: Fix outdated comments in catcache.h |
| Previous Message | Devanga.Susmitha@fujitsu.com | 2026-01-05 09:02:09 | Re: [PATCH] CRC32C optimizations using SVE2 on ARM. |