Contents
pg_snapshot_xmin()
A function returning the xmin value of a snapshot
pg_snapshot_xmin()
is a system function returning the xmin value of a snapshot.
pg_snapshot_xmin()
was added in PostgreSQL 13.
Usage
pg_snapshot_xmin (pg_snapshot
) →xid8
pg_snapshot_xmin()
replaces txid_snapshot_xmin()
.
Change history
- PostgreSQL 13
- added (commit 4c04be9b)
Examples
Basic usage example for 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)
References
- PostgreSQL documentation: Transaction ID and Snapshot Information Functions