Home Explore Blog CI



postgresql

78th chunk of `doc/src/sgml/monitoring.sgml`
030f3647392a20f6f3c5b607f846d34a47f9c47a580673cf0000000100000fba
 processing phase. See <xref linkend="basebackup-phases"/>.
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>backup_total</structfield> <type>bigint</type>
      </para>
      <para>
       Total amount of data that will be streamed. This is estimated and
       reported as of the beginning of
       <literal>streaming database files</literal> phase. Note that
       this is only an approximation since the database
       may change during <literal>streaming database files</literal> phase
       and WAL log may be included in the backup later. This is always
       the same value as <structfield>backup_streamed</structfield>
       once the amount of data streamed exceeds the estimated
       total size. If the estimation is disabled in
       <application>pg_basebackup</application>
       (i.e., <literal>--no-estimate-size</literal> option is specified),
       this is <literal>NULL</literal>.
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>backup_streamed</structfield> <type>bigint</type>
      </para>
      <para>
       Amount of data streamed. This counter only advances
       when the phase is <literal>streaming database files</literal> or
       <literal>transferring wal files</literal>.
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>tablespaces_total</structfield> <type>bigint</type>
      </para>
      <para>
       Total number of tablespaces that will be streamed.
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>tablespaces_streamed</structfield> <type>bigint</type>
      </para>
      <para>
       Number of tablespaces streamed. This counter only
       advances when the phase is <literal>streaming database files</literal>.
      </para></entry>
     </row>
    </tbody>
   </tgroup>
  </table>

  <table id="basebackup-phases">
   <title>Base Backup Phases</title>
   <tgroup cols="2">
    <colspec colname="col1" colwidth="1*"/>
    <colspec colname="col2" colwidth="2*"/>
    <thead>
     <row>
      <entry>Phase</entry>
      <entry>Description</entry>
     </row>
    </thead>
    <tbody>
     <row>
      <entry><literal>initializing</literal></entry>
      <entry>
       The WAL sender process is preparing to begin the backup.
       This phase is expected to be very brief.
      </entry>
     </row>
     <row>
      <entry><literal>waiting for checkpoint to finish</literal></entry>
      <entry>
       The WAL sender process is currently performing
       <function>pg_backup_start</function> to prepare to
       take a base backup, and waiting for the start-of-backup
       checkpoint to finish.
      </entry>
     </row>
     <row>
      <entry><literal>estimating backup size</literal></entry>
      <entry>
       The WAL sender process is currently estimating the total amount
       of database files that will be streamed as a base backup.
      </entry>
     </row>
     <row>
      <entry><literal>streaming database files</literal></entry>
      <entry>
       The WAL sender process is currently streaming database files
       as a base backup.
      </entry>
     </row>
     <row>
      <entry><literal>waiting for wal archiving to finish</literal></entry>
      <entry>
       The WAL sender process is currently performing
       <function>pg_backup_stop</function> to finish the backup,
       and waiting for all the WAL files required for the base backup
       to be successfully archived.
       If either <literal>--wal-method=none</literal> or
       <literal>--wal-method=stream</literal> is specified in
       <application>pg_basebackup</application>, the backup will end
       when this phase is completed.
      </entry>
     </row>
     <row>
      <entry><literal>transferring

Title: Base Backup Progress Details and Phases
Summary
The section details the `pg_stat_progress_basebackup` view columns including total and streamed data, tablespaces streamed and total tablespaces. It then defines the various phases of a base backup operation, such as initializing, waiting for checkpoint, estimating size, streaming database files, waiting for WAL archiving and transferring WAL files, including what each phase entails.