跳转到主要内容
← 目录图谱 / pg_stat_recovery

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.

首次收录 PG 19最近收录 PG 19当前字段 9

已与 PostgreSQL 19beta3 实例逐字段核对 · 原始实测记录 ↗

字段结构 PostgreSQL 19

pg_stat_recovery
字段 / COLUMN类型 / TYPE说明 / DESCRIPTION
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:

标记“隐式列”的字段不包含在 SELECT * 中;部分早期统计视图由同版本源码补全,额外来源会显示在字段说明中。

字段演化矩阵

悬停查看字段类型
存在新增 / 类型或属性变化移除
字段 / 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 是收录基线;基线中已存在的字段不标记为新增。矩阵按字段名称对齐,重命名显示为旧字段移除与新字段新增。

演化时间线

相邻大版本的变化

PostgreSQL 19 ← 18新增目录

+ 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

比较任意两个版本

选择两个版本,查看字段的新增、移除与类型变化。交互比较需要 JavaScript;演化时间线可直接阅读。