Home Explore Blog CI



postgresql

78th chunk of `doc/src/sgml/protocol.sgml`
6d656d7c7791bb0123af983c68bd2207e60272a8d61172de0000000100000fa3
     <listitem>
        <para>
         Identifies the message as a type message.
        </para>
       </listitem>
      </varlistentry>

      <varlistentry>
       <term>Int32 (TransactionId)</term>
       <listitem>
        <para>
         Xid of the transaction (only present for streamed transactions).
         This field is available since protocol version 2.
        </para>
       </listitem>
      </varlistentry>

      <varlistentry>
       <term>Int32 (Oid)</term>
       <listitem>
        <para>
         OID of the data type.
        </para>
       </listitem>
      </varlistentry>

      <varlistentry>
       <term>String</term>
       <listitem>
        <para>
         Namespace (empty string for <literal>pg_catalog</literal>).
        </para>
       </listitem>
      </varlistentry>

      <varlistentry>
       <term>String</term>
       <listitem>
        <para>
         Name of the data type.
        </para>
       </listitem>
      </varlistentry>
     </variablelist>
    </listitem>
   </varlistentry>

   <varlistentry id="protocol-logicalrep-message-formats-Insert">
    <term>Insert</term>
    <listitem>
     <variablelist>
      <varlistentry>
       <term>Byte1('I')</term>
       <listitem>
        <para>
         Identifies the message as an insert message.
        </para>
       </listitem>
      </varlistentry>

      <varlistentry>
       <term>Int32 (TransactionId)</term>
       <listitem>
        <para>
         Xid of the transaction (only present for streamed transactions).
         This field is available since protocol version 2.
        </para>
       </listitem>
      </varlistentry>

      <varlistentry>
       <term>Int32 (Oid)</term>
       <listitem>
        <para>
         OID of the relation corresponding to the ID in the relation
         message.
        </para>
       </listitem>
      </varlistentry>

      <varlistentry>
       <term>Byte1('N')</term>
       <listitem>
        <para>
         Identifies the following TupleData message as a new tuple.
        </para>
       </listitem>
      </varlistentry>

      <varlistentry>
       <term>TupleData</term>
       <listitem>
        <para>
         TupleData message part representing the contents of new tuple.
        </para>
       </listitem>
      </varlistentry>
     </variablelist>
    </listitem>
   </varlistentry>

   <varlistentry id="protocol-logicalrep-message-formats-Update">
    <term>Update</term>
    <listitem>
     <variablelist>
      <varlistentry>
       <term>Byte1('U')</term>
       <listitem>
        <para>
         Identifies the message as an update message.
        </para>
       </listitem>
      </varlistentry>

      <varlistentry>
       <term>Int32 (TransactionId)</term>
       <listitem>
        <para>
         Xid of the transaction (only present for streamed transactions).
         This field is available since protocol version 2.
        </para>
       </listitem>
      </varlistentry>

      <varlistentry>
       <term>Int32 (Oid)</term>
       <listitem>
        <para>
         OID of the relation corresponding to the ID in the relation
         message.
        </para>
       </listitem>
      </varlistentry>

      <varlistentry>
       <term>Byte1('K')</term>
       <listitem>
        <para>
         Identifies the following TupleData submessage as a key.
         This field is optional and is only present if
         the update changed data in any of the column(s) that are
         part of the REPLICA IDENTITY index.
        </para>
       </listitem>
      </varlistentry>

      <varlistentry>
       <term>Byte1('O')</term>
       <listitem>
        <para>
         Identifies the following TupleData submessage as an old tuple.
         This field is optional and is only present if table in which
         the update happened has REPLICA IDENTITY set to FULL.
        </para>
       </listitem>
      </varlistentry>

      <varlistentry>
       <term>TupleData</term>
       <listitem>
        <para>

Title: Logical Replication Message Formats for Insert and Update
Summary
This section describes the message formats for Insert and Update operations in logical replication, including the identification of the message type, transaction ID, relation OID, and tuple data, as well as optional fields for key and old tuple data, used for streaming transactions and logical decoding in PostgreSQL.