SYSTEM CATALOGS / STATISTICS VIEWS
pg_stat_recovery
Read PG 20 devel manual ↗The pg_stat_recovery view will contain at most one row, showing statistics about the recovery state of the startup process.
Development snapshot. These definitions may change before release.
- Kind
- Statistics views
- Columns in this snapshot
- 9
- Definition source
- English manual
Columns 9
| Column | Type | Description / reference |
|---|---|---|
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: |
Column history across versions
| Column | 9.0 | 9.1 | 9.2 | 9.3 | 9.4 | 9.5 | 9.6 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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 | · | · | · | · | · | · | · | · | · | · | · | · | · | · | · | · | ● | ● |
Version history 1
- PG 18 → 19added
Definition snapshot: english-manuals:9754eb7980fe5c7fee11530bbb2… · English manual source