Home Explore Blog CI



postgresql

31th chunk of `doc/src/sgml/protocol.sgml`
d45be54832bb4b3e80a48183257ede5974d09b2ef384ef110000000100000fa4
        can be used to check that the base backup used to initialize the
          standby came from the same cluster.
         </para>
        </listitem>
       </varlistentry>

       <varlistentry>
        <term><literal>timeline</literal> (<type>int8</type>)</term>
        <listitem>
         <para>
          Current timeline ID. Also useful to check that the standby is
          consistent with the primary.
         </para>
        </listitem>
       </varlistentry>

       <varlistentry>
        <term><literal>xlogpos</literal> (<type>text</type>)</term>
        <listitem>
         <para>
          Current WAL flush location. Useful to get a known location in the
          write-ahead log where streaming can start.
         </para>
        </listitem>
       </varlistentry>

       <varlistentry>
        <term><literal>dbname</literal> (<type>text</type>)</term>
        <listitem>
         <para>
          Database connected to or null.
         </para>
        </listitem>
       </varlistentry>
      </variablelist>
     </listitem>
    </varlistentry>

    <varlistentry id="protocol-replication-show">
     <term><literal>SHOW</literal> <replaceable class="parameter">name</replaceable>
      <indexterm><primary>SHOW</primary></indexterm>
     </term>
     <listitem>
      <para>
       Requests the server to send the current setting of a run-time parameter.
       This is similar to the SQL command <xref linkend="sql-show"/>.
      </para>

      <variablelist>
       <varlistentry>
        <term><replaceable class="parameter">name</replaceable></term>
        <listitem>
         <para>
          The name of a run-time parameter. Available parameters are documented
          in <xref linkend="runtime-config"/>.
         </para>
        </listitem>
       </varlistentry>
      </variablelist>
     </listitem>
    </varlistentry>

    <varlistentry id="protocol-replication-timeline-history">
     <term><literal>TIMELINE_HISTORY</literal> <replaceable class="parameter">tli</replaceable>
      <indexterm><primary>TIMELINE_HISTORY</primary></indexterm>
     </term>
     <listitem>
      <para>
       Requests the server to send over the timeline history file for timeline
       <replaceable class="parameter">tli</replaceable>.  Server replies with a
       result set of a single row, containing two fields.  While the fields
       are labeled as <type>text</type>, they effectively return raw bytes,
       with no encoding conversion:
      </para>

      <variablelist>
       <varlistentry>
        <term><literal>filename</literal> (<type>text</type>)</term>
        <listitem>
         <para>
          File name of the timeline history file, e.g., <filename>00000002.history</filename>.
         </para>
        </listitem>
       </varlistentry>

       <varlistentry>
        <term><literal>content</literal> (<type>text</type>)</term>
        <listitem>
         <para>
          Contents of the timeline history file.
         </para>
        </listitem>
       </varlistentry>
      </variablelist>
     </listitem>
    </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">output_plugin</replaceable> } [ ( <replaceable class="parameter">option</replaceable> [, ...] ) ]
      <indexterm><primary>CREATE_REPLICATION_SLOT</primary></indexterm>
     </term>
     <listitem>
      <para>
       Create a physical or logical replication
       slot. See <xref linkend="streaming-replication-slots"/> for more about
       replication slots.
      </para>

      <variablelist>
       <varlistentry>
        <term><replaceable class="parameter">slot_name</replaceable></term>
        <listitem>
         <para>
          The name of the slot to create.

Title: Streaming Replication Protocol Commands
Summary
The text describes various commands used in the streaming replication protocol, including IDENTIFY_SYSTEM, SHOW, TIMELINE_HISTORY, and CREATE_REPLICATION_SLOT, which are used to request server information, show runtime parameters, retrieve timeline history, and create replication slots, respectively, and explains the syntax and parameters of each command.