pg_stat_progress_basebackup — PostgreSQL statistics view

The PostgreSQL pg_stat_progress_basebackup statistics view: full column reference (names, types, descriptions), catalog relationships and version support.

Summary

Whenever an application like pg_basebackup is taking a base backup, the pg_stat_progress_basebackup view will contain a row for each WAL sender process that is currently running the BASE_BACKUP replication command and streaming the backup. The tables below describe the information that will be reported and provide information about how to interpret it.

(Description quoted from the official PostgreSQL documentation.)

Columns

The pg_stat_progress_basebackup statistics view exposes the following columns (names, types and descriptions are taken verbatim from the PostgreSQL documentation):

  • pid integer
    Process ID of a WAL sender process.
  • phase text
    Current processing phase. See basebackup_phases.
  • backup_total bigint
    Total amount of data that will be streamed. This is estimated and reported as of the beginning of streaming database files phase. Note that this is only an approximation since the database may change during streaming database files phase and WAL log may be included in the backup later. This is always the same value as backup_streamed once the amount of data streamed exceeds the estimated total size. If the estimation is disabled in pg_basebackup (i.e., –no-estimate-size option is specified), this is NULL.
  • backup_streamed bigint
    Amount of data streamed. This counter only advances when the phase is streaming database files or transferring wal files.
  • tablespaces_total bigint
    Total number of tablespaces that will be streamed.
  • tablespaces_streamed bigint
    Number of tablespaces streamed. This counter only advances when the phase is streaming database files.
  • backup_type text
    Backup type. Either full or incremental.

Version applicability

Present in PostgreSQL 17, 18, 19 (verified against each release’s documentation). This is a long-standing system object that also exists in earlier PostgreSQL releases.

Related & references

Reference: PostgreSQL documentation — pg_stat_progress_basebackup.