Home Explore Blog CI



postgresql

37th chunk of `doc/src/sgml/protocol.sgml`
6010ab07db4fac9db06e4ce7399e7f1d7c8d48920f1826300000000100000fa7
      The server's system clock at the time of transmission, as
             microseconds since midnight on 2000-01-01.
            </para>
           </listitem>
          </varlistentry>

          <varlistentry>
           <term>Byte<replaceable>n</replaceable></term>
           <listitem>
            <para>
             A section of the WAL data stream.
            </para>

            <para>
             A single WAL record is never split across two XLogData messages.
             When a WAL record crosses a WAL page boundary, and is therefore
             already split using continuation records, it can be split at the page
             boundary. In other words, the first main WAL record and its
             continuation records can be sent in different XLogData messages.
            </para>
           </listitem>
          </varlistentry>
         </variablelist>
        </listitem>
       </varlistentry>

       <varlistentry id="protocol-replication-primary-keepalive-message">
        <term>Primary keepalive message (B)</term>
        <listitem>
         <variablelist>
          <varlistentry>
           <term>Byte1('k')</term>
           <listitem>
            <para>
             Identifies the message as a sender keepalive.
            </para>
           </listitem>
          </varlistentry>

          <varlistentry>
           <term>Int64</term>
           <listitem>
            <para>
             The current end of WAL on the server.
            </para>
           </listitem>
          </varlistentry>

          <varlistentry>
           <term>Int64</term>
           <listitem>
            <para>
             The server's system clock at the time of transmission, as
             microseconds since midnight on 2000-01-01.
            </para>
           </listitem>
          </varlistentry>

          <varlistentry>
           <term>Byte1</term>
           <listitem>
            <para>
             1 means that the client should reply to this message as soon as
             possible, to avoid a timeout disconnect. 0 otherwise.
            </para>
           </listitem>
          </varlistentry>
         </variablelist>
        </listitem>
       </varlistentry>
      </variablelist>

      <para>
       The receiving process can send replies back to the sender at any time,
       using one of the following message formats (also in the payload of a
       CopyData message):
      </para>

      <variablelist>
       <varlistentry id="protocol-replication-standby-status-update">
        <term>Standby status update (F)</term>
        <listitem>
         <variablelist>
          <varlistentry>
           <term>Byte1('r')</term>
           <listitem>
            <para>
             Identifies the message as a receiver status update.
            </para>
           </listitem>
          </varlistentry>

          <varlistentry>
           <term>Int64</term>
           <listitem>
            <para>
             The location of the last WAL byte + 1 received and written to disk
             in the standby.
            </para>
           </listitem>
          </varlistentry>

          <varlistentry>
           <term>Int64</term>
           <listitem>
            <para>
             The location of the last WAL byte + 1 flushed to disk in
             the standby.
            </para>
           </listitem>
          </varlistentry>

          <varlistentry>
           <term>Int64</term>
           <listitem>
            <para>
             The location of the last WAL byte + 1 applied in the standby.
            </para>
           </listitem>
          </varlistentry>

          <varlistentry>
           <term>Int64</term>
           <listitem>
            <para>
             The client's system clock at the time of transmission, as
             microseconds since midnight on 2000-01-01.
            </para>
           </listitem>
          </varlistentry>

          <varlistentry>
           <term>Byte1</term>
           <listitem>

Title: WAL Streaming Message Formats
Summary
The server and client use specific message formats to communicate during WAL streaming, including XLogData messages for WAL data, primary keepalive messages to maintain the connection, and standby status update messages to report the client's progress in receiving and applying WAL data.