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