</listitem>
      </varlistentry>
 
-     <varlistentry id="guc-logical-decoding-mode" xreflabel="logical_decoding_mode">
-      <term><varname>logical_decoding_mode</varname> (<type>enum</type>)
+     <varlistentry id="guc-logical-replication-mode" xreflabel="logical_replication_mode">
+      <term><varname>logical_replication_mode</varname> (<type>enum</type>)
       <indexterm>
-       <primary><varname>logical_decoding_mode</varname> configuration parameter</primary>
+       <primary><varname>logical_replication_mode</varname> configuration parameter</primary>
       </indexterm>
       </term>
       <listitem>
        <para>
         Allows streaming or serializing changes immediately in logical decoding.
-        The allowed values of <varname>logical_decoding_mode</varname> are
+        The allowed values of <varname>logical_replication_mode</varname> are
         <literal>buffered</literal> and <literal>immediate</literal>. When set
         to <literal>immediate</literal>, stream each change if
         <literal>streaming</literal> option (see optional parameters set by
 
 static const Size max_changes_in_memory = 4096; /* XXX for restore only */
 
 /* GUC variable */
-int                    logical_decoding_mode = LOGICAL_DECODING_MODE_BUFFERED;
+int                    logical_replication_mode = LOGICAL_REP_MODE_BUFFERED;
 
 /* ---------------------------------------
  * primary reorderbuffer support routines
  * pick the largest (sub)transaction at-a-time to evict and spill its changes to
  * disk or send to the output plugin until we reach under the memory limit.
  *
- * If logical_decoding_mode is set to "immediate", stream or serialize the changes
- * immediately.
+ * If logical_replication_mode is set to "immediate", stream or serialize the
+ * changes immediately.
  *
  * XXX At this point we select the transactions until we reach under the memory
  * limit, but we might also adapt a more elaborate eviction strategy - for example
        ReorderBufferTXN *txn;
 
        /*
-        * Bail out if logical_decoding_mode is buffered and we haven't exceeded
+        * Bail out if logical_replication_mode is buffered and we haven't exceeded
         * the memory limit.
         */
-       if (logical_decoding_mode == LOGICAL_DECODING_MODE_BUFFERED &&
+       if (logical_replication_mode == LOGICAL_REP_MODE_BUFFERED &&
                rb->size < logical_decoding_work_mem * 1024L)
                return;
 
        /*
-        * If logical_decoding_mode is immediate, loop until there's no change.
+        * If logical_replication_mode is immediate, loop until there's no change.
         * Otherwise, loop until we reach under the memory limit. One might think
         * that just by evicting the largest (sub)transaction we will come under
         * the memory limit based on assumption that the selected transaction is
         * change.
         */
        while (rb->size >= logical_decoding_work_mem * 1024L ||
-                  (logical_decoding_mode == LOGICAL_DECODING_MODE_IMMEDIATE &&
+                  (logical_replication_mode == LOGICAL_REP_MODE_IMMEDIATE &&
                        rb->size > 0))
        {
                /*
 
        {NULL, 0, false}
 };
 
-static const struct config_enum_entry logical_decoding_mode_options[] = {
-       {"buffered", LOGICAL_DECODING_MODE_BUFFERED, false},
-       {"immediate", LOGICAL_DECODING_MODE_IMMEDIATE, false},
+static const struct config_enum_entry logical_replication_mode_options[] = {
+       {"buffered", LOGICAL_REP_MODE_BUFFERED, false},
+       {"immediate", LOGICAL_REP_MODE_IMMEDIATE, false},
        {NULL, 0, false}
 };
 
        },
 
        {
-               {"logical_decoding_mode", PGC_USERSET, DEVELOPER_OPTIONS,
-                       gettext_noop("Allows streaming or serializing each change in logical decoding."),
-                       NULL,
+               {"logical_replication_mode", PGC_USERSET, DEVELOPER_OPTIONS,
+                       gettext_noop("Controls when to replicate each change."),
+                       gettext_noop("On the publisher, it allows streaming or serializing each change in logical decoding."),
                        GUC_NOT_IN_SAMPLE
                },
-               &logical_decoding_mode,
-               LOGICAL_DECODING_MODE_BUFFERED, logical_decoding_mode_options,
+               &logical_replication_mode,
+               LOGICAL_REP_MODE_BUFFERED, logical_replication_mode_options,
                NULL, NULL, NULL
        },
 
 
 #include "utils/snapshot.h"
 #include "utils/timestamp.h"
 
+/* GUC variables */
 extern PGDLLIMPORT int logical_decoding_work_mem;
-extern PGDLLIMPORT int logical_decoding_mode;
+extern PGDLLIMPORT int logical_replication_mode;
 
-/* possible values for logical_decoding_mode */
+/* possible values for logical_replication_mode */
 typedef enum
 {
-       LOGICAL_DECODING_MODE_BUFFERED,
-       LOGICAL_DECODING_MODE_IMMEDIATE
-} LogicalDecodingMode;
+       LOGICAL_REP_MODE_BUFFERED,
+       LOGICAL_REP_MODE_IMMEDIATE
+} LogicalRepMode;
 
 /* an individual tuple, stored in one chunk of memory */
 typedef struct ReorderBufferTupleBuf
 
 my $node_publisher = PostgreSQL::Test::Cluster->new('publisher');
 $node_publisher->init(allows_streaming => 'logical');
 $node_publisher->append_conf('postgresql.conf',
-       'logical_decoding_mode = immediate');
+       'logical_replication_mode = immediate');
 $node_publisher->start;
 
 # Create subscriber node
 
 my $node_publisher = PostgreSQL::Test::Cluster->new('publisher');
 $node_publisher->init(allows_streaming => 'logical');
 $node_publisher->append_conf('postgresql.conf',
-       'logical_decoding_mode = immediate');
+       'logical_replication_mode = immediate');
 $node_publisher->start;
 
 # Create subscriber node
 
 my $node_publisher = PostgreSQL::Test::Cluster->new('publisher');
 $node_publisher->init(allows_streaming => 'logical');
 $node_publisher->append_conf('postgresql.conf',
-       'logical_decoding_mode = immediate');
+       'logical_replication_mode = immediate');
 $node_publisher->start;
 
 # Create subscriber node
 
 $node_publisher->append_conf(
        'postgresql.conf', qq(
 max_prepared_transactions = 10
-logical_decoding_mode = immediate
+logical_replication_mode = immediate
 ));
 $node_publisher->start;
 
 
 LogicalDecodeStreamTruncateCB
 LogicalDecodeTruncateCB
 LogicalDecodingContext
-LogicalDecodingMode
 LogicalErrorCallbackState
 LogicalOutputPluginInit
 LogicalOutputPluginWriterPrepareWrite
 LogicalRepCommitData
 LogicalRepCommitPreparedTxnData
 LogicalRepCtxStruct
+LogicalRepMode
 LogicalRepMsgType
 LogicalRepPartMapEntry
 LogicalRepPreparedTxnData