From 5c2fafe16a95bea32fd0808d596afb18446f69a6 Mon Sep 17 00:00:00 2001 From: Nathan Bossart Date: Mon, 30 Jun 2025 16:21:34 -0500 Subject: [PATCH v1 1/1] Document age(xid) and mxid_age(xid). --- doc/src/sgml/func.sgml | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 372cb036fde..f11c4f711d4 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -24638,6 +24638,34 @@ SELECT collation for ('foo' COLLATE "de_DE"); + + + + age + + age ( xid ) + integer + + + Returns the number of transactions between the supplied + transaction id and the current transaction counter. + + + + + + + mxid_age + + mxid_age ( xid ) + integer + + + Returns the number of multixacts IDs between the supplied + multixact ID and the current multixacts counter. + + + @@ -24773,7 +24801,8 @@ SELECT collation for ('foo' COLLATE "de_DE"); The internal transaction ID type xid is 32 bits wide and wraps around every 4 billion transactions. However, - the functions shown in use a + the functions shown in , except + age and mxid_age, use a 64-bit type xid8 that does not wrap around during the life of an installation, and can be converted to xid by casting if required. The data type pg_snapshot stores information about -- 2.39.5 (Apple Git-154)