doc: Fix description of replication command CREATE_REPLICATION_SLOT
authorMichael Paquier <[email protected]>
Wed, 12 Oct 2022 23:53:42 +0000 (08:53 +0900)
committerMichael Paquier <[email protected]>
Wed, 12 Oct 2022 23:53:42 +0000 (08:53 +0900)
The output plugin name is a mandatory option when creating a logical
slot, but the grammar documented was not described as such.  While on
it, fix two comments in repl_gram.y to show that TEMPORARY is an
optional grammar choice.

Author: Ayaki Tachikake
Discussion: https://postgr.es/m/OSAPR01MB2852607B2329FFA27834105AF1229@OSAPR01MB2852.jpnprd01.prod.outlook.com
Backpatch-through: 15

doc/src/sgml/protocol.sgml
src/backend/replication/repl_gram.y

index 75caa7fdb67941c8f7b3aca1e35cbc7c3914d96a..5fdd429e05d33373201039ff20ce1fc506d46a35 100644 (file)
@@ -1987,7 +1987,7 @@ psql "dbname=postgres replication=database" -c "IDENTIFY_SYSTEM;"
     </varlistentry>
 
     <varlistentry id="protocol-replication-create-replication-slot" xreflabel="CREATE_REPLICATION_SLOT">
-     <term><literal>CREATE_REPLICATION_SLOT</literal> <replaceable class="parameter">slot_name</replaceable> [ <literal>TEMPORARY</literal> ] { <literal>PHYSICAL</literal> | <literal>LOGICAL</literal> } [ ( <replaceable class="parameter">option</replaceable> [, ...] ) ]
+     <term><literal>CREATE_REPLICATION_SLOT</literal> <replaceable class="parameter">slot_name</replaceable> [ <literal>TEMPORARY</literal> ] { <literal>PHYSICAL</literal> | <literal>LOGICAL</literal> <replaceable class="parameter">output_plugin</replaceable> } [ ( <replaceable class="parameter">option</replaceable> [, ...] ) ]
       <indexterm><primary>CREATE_REPLICATION_SLOT</primary></indexterm>
      </term>
      <listitem>
index fe1ec2bc81002c009e584888f34fc6d6b2f4bd7d..7ba33d6672fc45b5c69ca5b51ffa3d74def1f7ab 100644 (file)
@@ -172,7 +172,7 @@ base_backup:
            ;
 
 create_replication_slot:
-           /* CREATE_REPLICATION_SLOT slot TEMPORARY PHYSICAL [options] */
+           /* CREATE_REPLICATION_SLOT slot [TEMPORARY] PHYSICAL [options] */
            K_CREATE_REPLICATION_SLOT IDENT opt_temporary K_PHYSICAL create_slot_options
                {
                    CreateReplicationSlotCmd *cmd;
@@ -183,7 +183,7 @@ create_replication_slot:
                    cmd->options = $5;
                    $$ = (Node *) cmd;
                }
-           /* CREATE_REPLICATION_SLOT slot TEMPORARY LOGICAL plugin [options] */
+           /* CREATE_REPLICATION_SLOT slot [TEMPORARY] LOGICAL plugin [options] */
            | K_CREATE_REPLICATION_SLOT IDENT opt_temporary K_LOGICAL IDENT create_slot_options
                {
                    CreateReplicationSlotCmd *cmd;