Skip to content
← Catalog atlas / pg_stat_recovery

STATISTICS VIEW · Statistics view

pg_stat_recovery

The pg_stat_recovery view will contain at most one row, showing statistics about the recovery state of the startup process. This view returns no rows when the server is not in recovery or the user does not have privileges of the pg_read_all_stats role.

First seen PG 19Last seen PG 19Columns 9

Checked column by column against a PostgreSQL 19beta3 instance · Raw measurement record ↗

Columns PostgreSQL 19

pg_stat_recovery
COLUMNTYPEDESCRIPTION
promote_triggered boolean True if a promotion has been triggered.
last_replayed_read_lsn pg_lsn Start write-ahead log location of the last successfully replayed WAL record.
last_replayed_end_lsn pg_lsn End write-ahead log location, plus one, of the last successfully replayed WAL record.
last_replayed_tli integer Timeline of the last successfully replayed WAL record.
replay_end_lsn pg_lsn Write-ahead log location of the record currently being replayed (end position plus one). When no record is being actively replayed, equals last_replayed_end_lsn.
replay_end_tli integer Timeline of the WAL record currently being replayed. When no record is being actively replayed, equals last_replayed_tli.
recovery_last_xact_time timestamp with time zone Timestamp of the last transaction commit or abort record replayed during recovery. This is the time at which the commit or abort WAL record for that transaction was generated on the primary.
current_chunk_start_time timestamp with time zone Time when the startup process observed that replay had caught up with the latest WAL chunk received from streaming replication. Used in recovery-conflict timing and replay/apply-lag diagnostics. NULL if streaming WAL has not yet been received or the time is not available.
pause_state text Recovery pause state. Possible values are:

Columns marked "implicit" are not included in SELECT *; some early statistics views are completed from same-version source, and the extra provenance is shown in the column description.

Column evolution matrix

Hover a cell for the column type
PresentAdded / type or attribute changeRemoved
COLUMN9.09.19.29.39.49.59.610111213141516171819
promote_triggered
last_replayed_read_lsn
last_replayed_end_lsn
last_replayed_tli
replay_end_lsn
replay_end_tli
recovery_last_xact_time
current_chunk_start_time
pause_state

9.0 is the coverage baseline; a column already present in the baseline is not marked as added. The matrix aligns columns by name, so a rename appears as the old column removed and a new column added.

Evolution timeline

Changes between adjacent majors

PostgreSQL 19 ← 18Catalog added

+ promote_triggered+ last_replayed_read_lsn+ last_replayed_end_lsn+ last_replayed_tli+ replay_end_lsn+ replay_end_tli+ recovery_last_xact_time+ current_chunk_start_time+ pause_state

Compare any two versions

Pick two versions to see added, removed, and retyped columns. The interactive comparison needs JavaScript; the evolution timeline reads fine without it.