From 18e3fcc31e79ab89a3c4296b33946999c0956cbb Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sat, 13 Oct 2007 23:06:28 +0000 Subject: Migrate the former contrib/txid module into core. This will make it easier for Slony and Skytools to depend on it. Per discussion. --- doc/src/sgml/datatype.sgml | 8 ++++- doc/src/sgml/func.sgml | 80 +++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 86 insertions(+), 2 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/datatype.sgml b/doc/src/sgml/datatype.sgml index 67f96ce1f73..326e4570303 100644 --- a/doc/src/sgml/datatype.sgml +++ b/doc/src/sgml/datatype.sgml @@ -1,4 +1,4 @@ - + Data Types @@ -246,6 +246,12 @@ full text search document + + txid_snapshot + + user-level transaction ID snapshot + + uuid diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 0eeb1545d98..8d4f4179ac8 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -1,4 +1,4 @@ - + Functions and Operators @@ -12048,6 +12048,84 @@ SELECT pg_type_is_visible('myschema.widget'::regtype); databases within each cluster and their descriptions are stored globally as well. + + + txid_current + + + + txid_current_snapshot + + + + txid_snapshot_xmin + + + + txid_snapshot_xmax + + + + txid_snapshot_xip + + + + txid_visible_in_snapshot + + + + The functions shown in + export server internal transaction info to user level. + + + + Transaction IDs and snapshots + + + Name Return Type Description + + + + + txid_current() + bigint + get current transaction ID + + + txid_current_snapshot() + txid_snapshot + get current snapshot + + + txid_snapshot_xmin(txid_snapshot) + bigint + get xmin of snapshot + + + txid_snapshot_xmax(txid_snapshot) + bigint + get xmax of snapshot + + + txid_snapshot_xip(txid_snapshot) + setof bigint + get in-progress transaction IDs in snapshot + + + txid_visible_in_snapshot(bigint, txid_snapshot) + boolean + is transaction ID visible in snapshot? + + + +
+ + + The internal transaction ID type (xid) is 32 bits wide and so + it wraps around every 4 billion transactions. However, these functions + export a 64-bit format that is extended with an epoch counter + so that it will not wrap around for the life of an installation. + -- cgit v1.2.3