From: Jeff Davis <pgsql@j-davis.com>
To: Noah Misch <noah@leadboat.com>
Cc: akapila@postgresql.org
Cc: dilipbalaut@gmail.com
Cc: nisha.moond412@gmail.com
Cc: pgsql-hackers@postgresql.org
Subject: Re: REASSIGN OWNED vs. relisshared dep on !relisshared
Date: Fri, 10 Jul 2026 15:11:16 -0700
Message-ID: <f629d0d3f74413e48a53bdf5b334b215c68545fb.camel@j-davis.com> (raw)
In-Reply-To: <20260710192533.4f.noahmisch@microsoft.com>
References: <20260710192533.4f.noahmisch@microsoft.com>
On Fri, 2026-07-10 at 12:25 -0700, Noah Misch wrote:
> Perhaps one could fix this by having REASSIGN OWNED process only
> pg_subscription rows where subdbid is the current database.
That was my first thought, as well. I will look into it.
> I'm nervous that we'll have other reasons to regret letting a shared
> object
> depend on a non-shared object, but I've not come up with anything
> else
> concrete.
That's a reasonable concern. We discussed it here:
https://www.postgresql.org/message-id/CAA4eK1LyHvRoNzZPpPQqo7a%3D5Wov8F-7%2BKDduy-9ymcRm%3DBatg%40ma...
Though the root of the problem might be that pg_subscription is shared
in the first place.
Perhaps we should just not record the dependency on the foreign server
at all, and if someone drops it, then the drop succeeds and the
connection fails later. That would be more like what would happen if
you revoke privileges, which also isn't tracked by the dependency
mechanism but has a similar result.
Regards,
Jeff Davis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: pgsql@j-davis.com, noah@leadboat.com, akapila@postgresql.org, dilipbalaut@gmail.com, nisha.moond412@gmail.com
Subject: Re: REASSIGN OWNED vs. relisshared dep on !relisshared
In-Reply-To: <f629d0d3f74413e48a53bdf5b334b215c68545fb.camel@j-davis.com>
References: <20260710192533.4f.noahmisch@microsoft.com> <f629d0d3f74413e48a53bdf5b334b215c68545fb.camel@j-davis.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox