Home Explore Blog CI



postgresql

81th chunk of `doc/src/sgml/protocol.sgml`
f073292ca9676c78f82d397b45dc74278336afb2155346810000000100000fa4
    <listitem>
        <para>
         A value of 1 indicates this is the first stream segment for
         this XID, 0 for any other stream segment.
        </para>
       </listitem>
      </varlistentry>
     </variablelist>
    </listitem>
   </varlistentry>

   <varlistentry id="protocol-logicalrep-message-formats-Stream-Stop">
    <term>Stream Stop</term>
    <listitem>
     <variablelist>
      <varlistentry>
       <term>Byte1('E')</term>
       <listitem>
        <para>
         Identifies the message as a stream stop message.
        </para>
       </listitem>
      </varlistentry>
     </variablelist>
    </listitem>
   </varlistentry>

   <varlistentry id="protocol-logicalrep-message-formats-Stream-Commit">
    <term>Stream Commit</term>
    <listitem>
     <variablelist>
      <varlistentry>
       <term>Byte1('c')</term>
       <listitem>
        <para>
         Identifies the message as a stream commit message.
        </para>
       </listitem>
      </varlistentry>

      <varlistentry>
       <term>Int32 (TransactionId)</term>
       <listitem>
        <para>
         Xid of the transaction.
        </para>
       </listitem>
      </varlistentry>

      <varlistentry>
       <term>Int8(0)</term>
       <listitem>
        <para>
         Flags; currently unused.
        </para>
       </listitem>
      </varlistentry>

      <varlistentry>
       <term>Int64 (XLogRecPtr)</term>
       <listitem>
        <para>
         The LSN of the commit.
        </para>
       </listitem>
      </varlistentry>

      <varlistentry>
       <term>Int64 (XLogRecPtr)</term>
       <listitem>
        <para>
         The end LSN of the transaction.
        </para>
       </listitem>
      </varlistentry>

      <varlistentry>
       <term>Int64 (TimestampTz)</term>
       <listitem>
        <para>
         Commit timestamp of the transaction. The value is in number
         of microseconds since PostgreSQL epoch (2000-01-01).
        </para>
       </listitem>
      </varlistentry>
     </variablelist>
    </listitem>
   </varlistentry>

   <varlistentry id="protocol-logicalrep-message-formats-Stream-Abort">
    <term>Stream Abort</term>
    <listitem>
     <variablelist>
      <varlistentry>
       <term>Byte1('A')</term>
       <listitem>
        <para>
         Identifies the message as a stream abort message.
        </para>
       </listitem>
      </varlistentry>

      <varlistentry>
       <term>Int32 (TransactionId)</term>
       <listitem>
        <para>
         Xid of the transaction.
        </para>
       </listitem>
      </varlistentry>

      <varlistentry>
       <term>Int32 (TransactionId)</term>
       <listitem>
        <para>
         Xid of the subtransaction (will be same as xid of the transaction for top-level
         transactions).
        </para>
       </listitem>
      </varlistentry>

      <varlistentry>
       <term>Int64 (XLogRecPtr)</term>
       <listitem>
        <para>
         The LSN of the abort. This field is available since protocol version
         4.
        </para>
       </listitem>
      </varlistentry>

      <varlistentry>
       <term>Int64 (TimestampTz)</term>
       <listitem>
        <para>
         Abort timestamp of the transaction. The value is in number
         of microseconds since PostgreSQL epoch (2000-01-01). This field is
         available since protocol version 4.
        </para>
       </listitem>
      </varlistentry>

     </variablelist>
    </listitem>
   </varlistentry>
  </variablelist>

  <para>
   The following messages (Begin Prepare, Prepare, Commit Prepared, Rollback Prepared, Stream Prepare)
   are available since protocol version 3.
  </para>

  <variablelist>
   <varlistentry id="protocol-logicalrep-message-formats-Begin-Prepare">
    <term>Begin Prepare</term>
    <listitem>
     <variablelist>
      <varlistentry>
       <term>Byte1('b')</term>
       <listitem>
        <para>
         Identifies the message as the beginning of a prepared transaction

Title: Logical Replication Message Formats for Stream Stop, Stream Commit, Stream Abort, and Prepare Messages
Summary
This section describes the message formats for Stream Stop, Stream Commit, Stream Abort, and various prepare messages in logical replication, including the identification of the message type, transaction ID, LSN, timestamp, and other relevant fields, with notes on protocol version compatibility and the availability of certain fields in specific versions.