Skip to content

Commit 8f45663

Browse files
Document age(xid) and mxid_age(xid).
These functions have been around for some time, but commits 48b5aa3 and 15afb7d were only back-patched to v16. Let's back-patch them to all supported versions now. Reported-by: David Rowley <dgrowleyml@gmail.com> (commit 48b5aa3) Author: Bruce Momjian <bruce@momjian.us> (commit 48b5aa3) Co-authored-by: Bertrand Drouvot <bertranddrouvot.pg@gmail.com> (commit 15afb7d) Reviewed-by: Michael Paquier <michael@paquier.xyz> (commit 15afb7d) Reviewed-by: Robert Haas <robertmhaas@gmail.com> Reviewed-by: Álvaro Herrera <alvherre@kurilemu.de> Discussion: https://postgr.es/m/aGMCxHxLfeMdQk8m%40nathan Backpatch-through: 13-15
1 parent 614ffb2 commit 8f45663

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

doc/src/sgml/func.sgml

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24638,6 +24638,34 @@ SELECT collation for ('foo' COLLATE "de_DE");
2463824638
</thead>
2463924639

2464024640
<tbody>
24641+
<row>
24642+
<entry role="func_table_entry"><para role="func_signature">
24643+
<indexterm>
24644+
<primary>age</primary>
24645+
</indexterm>
24646+
<function>age</function> ( <type>xid</type> )
24647+
<returnvalue>integer</returnvalue>
24648+
</para>
24649+
<para>
24650+
Returns the number of transactions between the supplied
24651+
transaction id and the current transaction counter.
24652+
</para></entry>
24653+
</row>
24654+
24655+
<row>
24656+
<entry role="func_table_entry"><para role="func_signature">
24657+
<indexterm>
24658+
<primary>mxid_age</primary>
24659+
</indexterm>
24660+
<function>mxid_age</function> ( <type>xid</type> )
24661+
<returnvalue>integer</returnvalue>
24662+
</para>
24663+
<para>
24664+
Returns the number of multixacts IDs between the supplied
24665+
multixact ID and the current multixacts counter.
24666+
</para></entry>
24667+
</row>
24668+
2464124669
<row>
2464224670
<entry role="func_table_entry"><para role="func_signature">
2464324671
<indexterm>
@@ -24773,7 +24801,8 @@ SELECT collation for ('foo' COLLATE "de_DE");
2477324801
<para>
2477424802
The internal transaction ID type <type>xid</type> is 32 bits wide and
2477524803
wraps around every 4 billion transactions. However,
24776-
the functions shown in <xref linkend="functions-pg-snapshot"/> use a
24804+
the functions shown in <xref linkend="functions-pg-snapshot"/>, except
24805+
<function>age</function> and <function>mxid_age</function>, use a
2477724806
64-bit type <type>xid8</type> that does not wrap around during the life
2477824807
of an installation, and can be converted to <type>xid</type> by casting if
2477924808
required. The data type <type>pg_snapshot</type> stores information about

0 commit comments

Comments
 (0)