pg_last_xact_replay_timestamp() 是一个系统函数,用于返回恢复期间已重放的最后一个事务的时间戳。
pg_last_xact_replay_timestamp() 在 PostgreSQL 9.4 中添加。
用法
pg_last_xact_replay_timestamp () → timestamp with time zone
返回的时间戳是该事务的提交或中止 WAL 记录在主服务器上生成的时间。
如果在恢复期间没有重放任何事务,或者服务器不在恢复模式下,则返回 NULL。
变更历史
- PostgreSQL 9.4
- 添加 (commit 7ba6e4f0)
参考资料
- PostgreSQL 文档: 恢复信息函数
