Re: [17] CREATE SUBSCRIPTION ... SERVER
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Jeff Davis <pgsql@j-davis.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers@postgresql.org
Date: 2023-08-31T12:37:49Z
Lists: pgsql-hackers
On Wed, Aug 30, 2023 at 1:19 PM Jeff Davis <pgsql@j-davis.com> wrote: > On Wed, 2023-08-30 at 09:49 -0400, Tom Lane wrote: > > This seems like it requires a whole lot of new mechanism (parser > > and catalog infrastructure) that could be done far more easily > > in other ways. In particular, how about inventing a built-in > > dummy FDW to serve the purpose? > > That was my initial approach, but it was getting a bit messy. > > FDWs don't have a schema, so we can't put it in pg_catalog, and names > beginning with "pg_" aren't restricted now. Should I retroactively > restrict FDW names that begin with "pg_"? Or just use special cases in > pg_dump and elsewhere? Also I didn't see a great place to document it. > > Admittedly, I didn't complete the dummy-FDW approach, so perhaps it > works out better overall. I can give it a try. What I feel is kind of weird about this syntax is that it seems like it's entangled with the FDW mechanism but doesn't really overlap with it. You could have something that is completely separate (CREATE SUBSCRIPTION CONNECTION) or something that truly does have some overlap (no new syntax and a dummy fdw, as Tom proposes, or somehow knowing that postgres_fdw is special, as Ashutosh proposes). But this seems like sort of an odd middle ground. I also think that the decision to make pg_create_connection a member of pg_create_subscription by default, but encouraging users to think about revoking it, is kind of strange. I don't think we really want to encourage users to tinker with predefined roles in this kind of way. I think there are better ways of achieving the goals here. -- Robert Haas EDB: http://www.enterprisedb.com
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