Skip to content

Commit 4bcca5f

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 13f1e9f commit 4bcca5f

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
@@ -23238,6 +23238,34 @@ SELECT collation for ('foo' COLLATE "de_DE");
2323823238
</thead>
2323923239

2324023240
<tbody>
23241+
<row>
23242+
<entry role="func_table_entry"><para role="func_signature">
23243+
<indexterm>
23244+
<primary>age</primary>
23245+
</indexterm>
23246+
<function>age</function> ( <type>xid</type> )
23247+
<returnvalue>integer</returnvalue>
23248+
</para>
23249+
<para>
23250+
Returns the number of transactions between the supplied
23251+
transaction id and the current transaction counter.
23252+
</para></entry>
23253+
</row>
23254+
23255+
<row>
23256+
<entry role="func_table_entry"><para role="func_signature">
23257+
<indexterm>
23258+
<primary>mxid_age</primary>
23259+
</indexterm>
23260+
<function>mxid_age</function> ( <type>xid</type> )
23261+
<returnvalue>integer</returnvalue>
23262+
</para>
23263+
<para>
23264+
Returns the number of multixacts IDs between the supplied
23265+
multixact ID and the current multixacts counter.
23266+
</para></entry>
23267+
</row>
23268+
2324123269
<row>
2324223270
<entry role="func_table_entry"><para role="func_signature">
2324323271
<indexterm>
@@ -23373,7 +23401,8 @@ SELECT collation for ('foo' COLLATE "de_DE");
2337323401
<para>
2337423402
The internal transaction ID type <type>xid</type> is 32 bits wide and
2337523403
wraps around every 4 billion transactions. However,
23376-
the functions shown in <xref linkend="functions-pg-snapshot"/> use a
23404+
the functions shown in <xref linkend="functions-pg-snapshot"/>, except
23405+
<function>age</function> and <function>mxid_age</function>, use a
2337723406
64-bit type <type>xid8</type> that does not wrap around during the life
2337823407
of an installation, and can be converted to <type>xid</type> by casting if
2337923408
required. The data type <type>pg_snapshot</type> stores information about

0 commit comments

Comments
 (0)