summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorMichael Paquier2024-11-20 05:21:07 +0000
committerMichael Paquier2024-11-20 05:21:07 +0000
commit6fc3c587b8556c27c90998bd98259279dc794f33 (patch)
treebedab698e2e6ef04a288f39325a8a32d08495de7 /doc/src
parentc1ebef3c10dbfd8c6ec4c9b9ab03b7d1fe00ac79 (diff)
doc: Fix section of functions age(xid) and mxid_age(xid)
In 17~, age(xid) and mxid_age(xid) were listed as deprecated. Based on the discussion that led to 48b5aa3143, this is not intentional as this could break many existing monitoring queries. Note that vacuumdb also uses both of them. In 16, both functions were listed under "Control Data Functions", which is incorrect, so let's move them to the list of functions related to transaction IDs and snapshots. Author: Bertrand Drouvot Discussion: https://postgr.es/m/[email protected] Discussion: https://postgr.es/m/[email protected] Backpatch-through: 16
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/func.sgml58
1 files changed, 30 insertions, 28 deletions
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 2cd93163b75..13e1642192a 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -27012,6 +27012,34 @@ SELECT currval(pg_get_serial_sequence('sometable', 'id'));
<row>
<entry role="func_table_entry"><para role="func_signature">
<indexterm>
+ <primary>age</primary>
+ </indexterm>
+ <function>age</function> ( <type>xid</type> )
+ <returnvalue>integer</returnvalue>
+ </para>
+ <para>
+ Returns the number of transactions between the supplied
+ transaction id and the current transaction counter.
+ </para></entry>
+ </row>
+
+ <row>
+ <entry role="func_table_entry"><para role="func_signature">
+ <indexterm>
+ <primary>mxid_age</primary>
+ </indexterm>
+ <function>mxid_age</function> ( <type>xid</type> )
+ <returnvalue>integer</returnvalue>
+ </para>
+ <para>
+ Returns the number of multixacts IDs between the supplied
+ multixact ID and the current multixacts counter.
+ </para></entry>
+ </row>
+
+ <row>
+ <entry role="func_table_entry"><para role="func_signature">
+ <indexterm>
<primary>pg_current_xact_id</primary>
</indexterm>
<function>pg_current_xact_id</function> ()
@@ -27153,7 +27181,8 @@ SELECT currval(pg_get_serial_sequence('sometable', 'id'));
<para>
The internal transaction ID type <type>xid</type> is 32 bits wide and
wraps around every 4 billion transactions. However,
- the functions shown in <xref linkend="functions-pg-snapshot"/> use a
+ the functions shown in <xref linkend="functions-pg-snapshot"/>, except
+ <function>age</function> and <function>mxid_age</function>, use a
64-bit type <type>xid8</type> that does not wrap around during the life
of an installation and can be converted to <type>xid</type> by casting if
required; see <xref linkend="transaction-id"/> for details.
@@ -27235,33 +27264,6 @@ SELECT currval(pg_get_serial_sequence('sometable', 'id'));
</thead>
<tbody>
- <row>
- <entry role="func_table_entry"><para role="func_signature">
- <indexterm>
- <primary>age</primary>
- </indexterm>
- <function>age</function> ( <type>xid</type> )
- <returnvalue>integer</returnvalue>
- </para>
- <para>
- Returns the number of transactions between the supplied
- transaction id and the current transaction counter.
- </para></entry>
- </row>
-
- <row>
- <entry role="func_table_entry"><para role="func_signature">
- <indexterm>
- <primary>mxid_age</primary>
- </indexterm>
- <function>mxid_age</function> ( <type>xid</type> )
- <returnvalue>integer</returnvalue>
- </para>
- <para>
- Returns the number of multixacts IDs between the supplied
- multixact ID and the current multixacts counter.
- </para></entry>
- </row>
<row>
<entry role="func_table_entry"><para role="func_signature">