Re: [19] CREATE SUBSCRIPTION ... SERVER
Amit Kapila <amit.kapila16@gmail.com>
From: Amit Kapila <amit.kapila16@gmail.com>
To: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Cc: Jeff Davis <pgsql@j-davis.com>, Masahiko Sawada <sawada.mshk@gmail.com>, Shlok Kyal <shlok.kyal.oss@gmail.com>, Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>,
Joe Conway <mail@joeconway.com>, pgsql-hackers@postgresql.org
Date: 2026-03-07T07:05:32Z
Lists: pgsql-hackers
On Fri, Mar 6, 2026 at 9:49 PM Ashutosh Bapat <ashutosh.bapat.oss@gmail.com> wrote: > > On Thu, Mar 5, 2026 at 2:23 PM Jeff Davis <pgsql@j-davis.com> wrote: > > > > On Thu, 2026-03-05 at 09:21 +0530, Amit Kapila wrote: > > > > Additionally, I ran into a problem that's worth highlighting: > > > > DROP SERVER ... CASCADE was broken, because the subscription is > > dependent on it but that's in a global catalog, which is not handled by > > doDeletion(). The subscription is conceptually a per-database object, > > but it's in a shared catalog with a subdbid field. I solved that > > problem by adding a guard to findDependentObjects() to check for the > > referenced object belonging to a shared catalog, and if so it just > > throws an error (so CASCADE is not supported for servers used in > > subscriptions). That's a simple but not a very satisfying solution, so > > let me know if you see a problem with that. > > I shared the awkwardness, but don't have any better ideas. However, it > does raise a question as to why do we need an FDW to be database > specific or for that matter a SERVER database specific. That might be > because it requires an extension which is database specific. Probably > we should support extensions which are database agnostic. However > that's way beyond the scope of this patch. Other way around why do we > need subscriptions to be shared objects? > It is because the launcher process needs to traverse all subscriptions to start workers. -- With Regards, Amit Kapila.
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Document new catalog columns, missed in commit 8185bb5347.
- 90630ec42939 19 (unreleased) landed
-
Refactor to remove ForeignServerName().
- 11f8018ee678 19 (unreleased) landed
-
GetSubscription(): use per-object memory context.
- f16f5d608ca6 19 (unreleased) landed
-
Fix dependency on FDW's connection function.
- 4a0b46b6e1e4 19 (unreleased) landed
-
ALTER SUBSCRIPTION ... SERVER test.
- 1c5bf1185af0 19 (unreleased) landed
-
Fix pg_dump for CREATE FOREIGN DATA WRAPPER ... CONNECTION.
- b71bf3b84570 19 (unreleased) landed
-
Clean up postgres_fdw/t/010_subscription.pl.
- f4af7849b3db 19 (unreleased) landed
-
CREATE SUBSCRIPTION ... SERVER.
- 8185bb534763 19 (unreleased) landed
-
Allow upgrades to preserve the full subscription's state.
- 9a17be1e244a 17.0 cited