Home Explore Blog CI



postgresql

47th chunk of `doc/src/sgml/protocol.sgml`
b810d90cb2768a084d400e91b3cf71d7a92b8814085fb83a0000000100000faa
 <filename>pg_tblspc</filename> are maintained.)
         </para>
        </listitem>
       </itemizedlist>
       Owner, group, and file mode are set if the underlying file system on
       the server supports it.
      </para>
     </listitem>
    </varlistentry>
   </variablelist>
  </para>

  <para>
   In all the above commands,
   when specifying a parameter of type <type>boolean</type> the
   <replaceable class="parameter">value</replaceable> part can be omitted,
   which is equivalent to specifying <literal>TRUE</literal>.
  </para>
 </sect1>

<sect1 id="protocol-logical-replication">
 <title>Logical Streaming Replication Protocol</title>

 <para>
  This section describes the logical replication protocol, which is the message
  flow started by the <literal>START_REPLICATION</literal>
  <literal>SLOT</literal> <replaceable class="parameter">slot_name</replaceable>
  <literal>LOGICAL</literal> replication command.
 </para>

 <para>
  The logical streaming replication protocol builds on the primitives of
  the physical streaming replication protocol.
 </para>

 <para>
  <productname>PostgreSQL</productname> logical decoding supports output
  plugins.  <literal>pgoutput</literal> is the standard one used for
  the built-in logical replication.
 </para>

 <sect2 id="protocol-logical-replication-params">
  <title>Logical Streaming Replication Parameters</title>

  <para>
   Using the <literal>START_REPLICATION</literal> command,
   <literal>pgoutput</literal> accepts the following options:

   <variablelist>
    <varlistentry>
     <term>
      proto_version
     </term>
     <listitem>
      <para>
       Protocol version. Currently versions <literal>1</literal>, <literal>2</literal>,
       <literal>3</literal>, and <literal>4</literal> are supported.  A valid
       version is required.
      </para>
      <para>
       Version <literal>2</literal> is supported only for server version 14
       and above, and it allows streaming of large in-progress transactions.
      </para>
      <para>
       Version <literal>3</literal> is supported only for server version 15
       and above, and it allows streaming of two-phase commits.
      </para>
      <para>
       Version <literal>4</literal> is supported only for server version 16
       and above, and it allows streams of large in-progress transactions to
       be applied in parallel.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term>
      publication_names
     </term>
     <listitem>
      <para>
       Comma-separated list of publication names for which to subscribe
       (receive changes). The individual publication names are treated
       as standard objects names and can be quoted the same as needed.
       At least one publication name is required.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term>
      binary
     </term>
     <listitem>
      <para>
       Boolean option to use binary transfer mode.  Binary mode is faster
       than the text mode but slightly less robust.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term>
      messages
     </term>
     <listitem>
      <para>
       Boolean option to enable sending the messages that are written
       by <function>pg_logical_emit_message</function>.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term>
      streaming
     </term>
     <listitem>
      <para>
       Boolean option to enable streaming of in-progress transactions.
       It accepts an additional value "parallel" to enable sending extra
       information with some messages to be used for parallelisation.
       Minimum protocol version 2 is required to turn it on.  Minimum protocol
       version 4 is required for the "parallel" option.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term>
      two_phase
     </term>
     <listitem>
      <para>
       Boolean option to enable two-phase transactions.

Title: Logical Streaming Replication Protocol Parameters
Summary
The logical replication protocol in PostgreSQL supports various parameters, including protocol version, publication names, binary transfer mode, message sending, streaming of in-progress transactions, and two-phase transactions, which can be specified using the START_REPLICATION command with the pgoutput plugin.