Re: [17] CREATE SUBSCRIPTION ... SERVER

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: [17] CREATE SUBSCRIPTION ... SERVER
Дата
Msg-id CA+TgmobciM2g8dHD5qj=9iFqhQioNyJjjCUnsHRQKCLmqma-6g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [17] CREATE SUBSCRIPTION ... SERVER  (Jeff Davis <pgsql@j-davis.com>)
Ответы Re: [17] CREATE SUBSCRIPTION ... SERVER  (Jeff Davis <pgsql@j-davis.com>)
Список 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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: John Naylor
Дата:
Сообщение: Re: Replace some cstring_to_text to cstring_to_text_with_len
Следующее
От: Ashutosh Bapat
Дата:
Сообщение: Re: persist logical slots to disk during shutdown checkpoint