diff options
author | Nathan Bossart | 2025-07-01 18:54:38 +0000 |
---|---|---|
committer | Nathan Bossart | 2025-07-01 18:54:38 +0000 |
commit | f5551538bce031e0e6d47e25c4f488f0e642a4a6 (patch) | |
tree | 404352dfa292088e2ee683fe2bd49bcdd9dd6685 | |
parent | 9d14d40ec5ee6c5d1a959995c2c70b82a8898fda (diff) |
Document pg_get_multixact_members().
Oversight in commit 0ac5ad5134.
Author: Sami Imseih <[email protected]>
Co-authored-by: Álvaro Herrera <[email protected]>
Reviewed-by: Ashutosh Bapat <[email protected]>
Discussion: https://postgr.es/m/20150619215231.GT133018%40postgresql.org
Discussion: https://postgr.es/m/CAA5RZ0sjQDDwJfMRb%3DZ13nDLuRpF13ME2L_BdGxi0op8RKjmDg%40mail.gmail.com
Backpatch-through: 13
-rw-r--r-- | doc/src/sgml/func.sgml | 28 | ||||
-rw-r--r-- | doc/src/sgml/maintenance.sgml | 5 |
2 files changed, 31 insertions, 2 deletions
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index d7e9fe4478f..9db19c5d4ab 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -27184,6 +27184,31 @@ SELECT currval(pg_get_serial_sequence('sometable', 'id')); details. </para></entry> </row> + + <row> + <entry role="func_table_entry"><para role="func_signature"> + <indexterm> + <primary>pg_get_multixact_members</primary> + </indexterm> + <function>pg_get_multixact_members</function> ( <parameter>multixid</parameter> <type>xid</type> ) + <returnvalue>setof record</returnvalue> + ( <parameter>xid</parameter> <type>xid</type>, + <parameter>mode</parameter> <type>text</type> ) + </para> + <para> + Returns the transaction ID and lock mode for each member of the + specified multixact ID. The lock modes <literal>forupd</literal>, + <literal>fornokeyupd</literal>, <literal>sh</literal>, and + <literal>keysh</literal> correspond to the row-level locks + <literal>FOR UPDATE</literal>, <literal>FOR NO KEY UPDATE</literal>, + <literal>FOR SHARE</literal>, and <literal>FOR KEY SHARE</literal>, + respectively, as described in <xref linkend="locking-rows"/>. Two + additional modes are specific to multixacts: + <literal>nokeyupd</literal>, used by updates that do not modify key + columns, and <literal>upd</literal>, used by updates or deletes that + modify key columns. + </para></entry> + </row> </tbody> </tgroup> </table> @@ -27192,7 +27217,8 @@ SELECT currval(pg_get_serial_sequence('sometable', 'id')); 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"/>, except - <function>age</function> and <function>mxid_age</function>, use a + <function>age</function>, <function>mxid_age</function>, and + <function>pg_get_multixact_members</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. diff --git a/doc/src/sgml/maintenance.sgml b/doc/src/sgml/maintenance.sgml index 89040942be2..b81a5806eb6 100644 --- a/doc/src/sgml/maintenance.sgml +++ b/doc/src/sgml/maintenance.sgml @@ -761,7 +761,10 @@ HINT: Execute a database-wide VACUUM in that database. careful aging management, storage cleanup, and wraparound handling. There is a separate storage area which holds the list of members in each multixact, which also uses a 32-bit counter and which must also - be managed. + be managed. The system function + <function>pg_get_multixact_members()</function> described in + <xref linkend="functions-pg-snapshot"/> can be used to examine the + transaction IDs associated with a multixact ID. </para> <para> |