pg_stat_archiver — PostgreSQL statistics view

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

Summary

The pg_stat_archiver view will always have a single row, containing data about the archiver process of the cluster.

(Description quoted from the official PostgreSQL documentation.)

Columns

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

  • archived_count bigint
    Number of WAL files that have been successfully archived
  • last_archived_wal text
    Name of the WAL file most recently successfully archived
  • last_archived_time timestamp with time zone
    Time of the most recent successful archive operation
  • failed_count bigint
    Number of failed attempts for archiving WAL files
  • last_failed_wal text
    Name of the WAL file of the most recent failed archival operation
  • last_failed_time timestamp with time zone
    Time of the most recent failed archival operation
  • stats_reset timestamp with time zone
    Time at which these statistics were last reset

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_archiver.