Re: Doc: CREATE_REPLICATION_SLOT command requires the plugin name

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: Doc: CREATE_REPLICATION_SLOT command requires the plugin name
Дата
Msg-id CAA4eK1JpGuZSwk1HUyz6a8s4bkV84F2+Z9Mg=Y4y21QDQ+pCLg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Doc: CREATE_REPLICATION_SLOT command requires the plugin name  (Antonin Houska <ah@cybertec.at>)
Ответы Re: Doc: CREATE_REPLICATION_SLOT command requires the plugin name  (Antonin Houska <ah@cybertec.at>)
Список pgsql-hackers
On Tue, Feb 1, 2022 at 5:43 PM Antonin Houska <ah@cybertec.at> wrote:
>
> Amit Kapila <amit.kapila16@gmail.com> wrote:
>
> > On Tue, Feb 1, 2022 at 3:44 PM Antonin Houska <ah@cybertec.at> wrote:
> > >
> > > I got a syntax error when using the command according to the existing
> > > documentation. The output_plugin parameter needs to be passed too.
> > >
> >
> > Why do we need it for physical slots?
>
> Sure we don't, the missing curly brackets seem to be the problem. I used the
> other form of the command for reference, which therefore might need a minor
> fix too.
>

Okay, I see that it is not very clear from the documentation.

   <varlistentry>
-    <term><literal>CREATE_REPLICATION_SLOT</literal> <replaceable
class="parameter">slot_name</replaceable> [
<literal>TEMPORARY</literal> ] { <literal>PHYSICAL</literal> [
<literal>RESERVE_WAL</literal> ] | <literal>LOGICAL</literal>
<replaceable class="parameter">output_plugin</replaceable> [
<literal>EXPORT_SNAPSHOT</literal> |
<literal>NOEXPORT_SNAPSHOT</literal> | <literal>USE_SNAPSHOT</literal>
| <literal>TWO_PHASE</literal> ] }
+    <term><literal>CREATE_REPLICATION_SLOT</literal> <replaceable
class="parameter">slot_name</replaceable> [
<literal>TEMPORARY</literal> ] { <literal>PHYSICAL</literal> [
<literal>RESERVE_WAL</literal> ] | { <literal>LOGICAL</literal>
<replaceable class="parameter">output_plugin</replaceable>
+} [ <literal>EXPORT_SNAPSHOT</literal> |
<literal>NOEXPORT_SNAPSHOT</literal> | <literal>USE_SNAPSHOT</literal>
| <literal>TWO_PHASE</literal> ] }

Instead of adding additional '{}', can't we simply use:
{ <literal>PHYSICAL</literal> [ <literal>RESERVE_WAL</literal> ] |
<literal>LOGICAL</literal> <replaceable
class="parameter">output_plugin</replaceable> } [
<literal>EXPORT_SNAPSHOT</literal> |
<literal>NOEXPORT_SNAPSHOT</literal> | <literal>USE_SNAPSHOT</literal>
| <literal>TWO_PHASE</literal> ]

I am not sure change to other syntax is useful as that is kept for
backward compatibility. I think we can keep that as it is.

-- 
With Regards,
Amit Kapila.



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

Предыдущее
От: Thomas Munro
Дата:
Сообщение: Re: A test for replay of regression tests
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: Design of pg_stat_subscription_workers vs pgstats