Home Explore Blog CI



postgresql

83th chunk of `doc/src/sgml/protocol.sgml`
79c2f9a821ebd6acdaec7f5c7f935ab74d78a279f0892fb40000000100000fa7
 prepared transaction.
        </para>
       </listitem>
      </varlistentry>

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

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

      <varlistentry>
       <term>String</term>
       <listitem>
        <para>
         The user defined GID of the prepared transaction.
        </para>
       </listitem>
      </varlistentry>
     </variablelist>
    </listitem>
   </varlistentry>

   <varlistentry id="protocol-logicalrep-message-formats-Commit-Prepared">
    <term>Commit Prepared</term>
    <listitem>
     <variablelist>
      <varlistentry>
       <term>Byte1('K')</term>
       <listitem>
        <para>
         Identifies the message as the commit of a prepared transaction message.
        </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 of the prepared transaction.
        </para>
       </listitem>
      </varlistentry>

      <varlistentry>
       <term>Int64 (XLogRecPtr)</term>
       <listitem>
        <para>
         The end LSN of the commit of the prepared 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>

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

      <varlistentry>
       <term>String</term>
       <listitem>
        <para>
         The user defined GID of the prepared transaction.
        </para>
       </listitem>
      </varlistentry>
     </variablelist>
    </listitem>
   </varlistentry>

   <varlistentry id="protocol-logicalrep-message-formats-Rollback-Prepared">
    <term>Rollback Prepared</term>
    <listitem>
     <variablelist>
      <varlistentry>
       <term>Byte1('r')</term>
       <listitem>
        <para>
         Identifies the message as the rollback of a prepared transaction message.
        </para>
       </listitem>
      </varlistentry>

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

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

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

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

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

Title: Logical Replication Message Formats for Transaction Management
Summary
This section describes the message formats for managing prepared transactions in logical replication, including Commit Prepared and Rollback Prepared messages, with details on fields such as LSN, timestamp, transaction ID, and user-defined GID, which are used to identify and manage transactions.