pg_wal_summary_contents() 是一个用于显示WAL摘要详细信息的系统函数。
pg_wal_summary_contents() 在 PostgreSQL 17 中引入。
用法
pg_wal_summary_contents (tlibigint,start_lsnpg_lsn,end_lsnpg_lsn) →
setof record ( relfilenode oid,
reltablespace oid,
reldatabase oid,
relforknumber smallint,
relblocknumber bigint,
is_limit_block boolean )
变更历史
- PostgreSQL 17
- 添加于(提交 174c4805)
示例
pg_wal_summary_contents() 的基本用法示例
postgres=# SELECT * FROM pg_available_wal_summaries() LIMIT 1; tli | start_lsn | end_lsn -----+-----------+----------- 1 | 0/14F3F40 | 0/14F4290 (1 row) postgres=# SELECT * FROM pg_wal_summary_contents(1, '0/14F3F40', '0/14F4290'); relfilenode | reltablespace | reldatabase | relforknumber | relblocknumber | is_limit_block -------------+---------------+-------------+---------------+----------------+---------------- 2396 | 1664 | 0 | 0 | 0 | f 2397 | 1664 | 0 | 0 | 1 | f (2 rows)
参考资料
- PostgreSQL 文档: WAL 汇总信息函数
