pg_snapshot_xmax() 是一个系统函数,用于返回快照的 xmax 值。
pg_snapshot_xmax() 添加于 PostgreSQL 13。
用法
pg_snapshot_xmax (pg_snapshot) →xid8
pg_snapshot_xmax() 取代了 txid_snapshot_xmax()。
变更历史
- PostgreSQL 13
- added (commit 4c04be9b)
示例
pg_snapshot_xmax() 的基本用法示例
postgres=# SELECT pg_current_snapshot(); pg_current_snapshot --------------------- 795:799:795,797 (1 row) postgres=# SELECT pg_snapshot_xmax(pg_current_snapshot()); pg_snapshot_xmax ------------------ 799 (1 row)
参考资料
- PostgreSQL documentation: 事务 ID 和快照信息函数
反馈
请在此处提交关于“pg_snapshot_xmax()”的任何评论、建议或更正。