> 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.