Skip to content

Commit e35a017

Browse files
nathan-bossartÁlvaro Herrera
andcommitted
Document pg_get_multixact_members().
Oversight in commit 0ac5ad5. Author: Sami Imseih <samimseih@gmail.com> Co-authored-by: Álvaro Herrera <alvherre@kurilemu.de> Reviewed-by: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com> Discussion: https://postgr.es/m/20150619215231.GT133018%40postgresql.org Discussion: https://postgr.es/m/CAA5RZ0sjQDDwJfMRb%3DZ13nDLuRpF13ME2L_BdGxi0op8RKjmDg%40mail.gmail.com Backpatch-through: 13
1 parent 71d71ac commit e35a017

File tree

2 files changed

+31
-2
lines changed

2 files changed

+31
-2
lines changed

doc/src/sgml/func.sgml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24270,6 +24270,31 @@ SELECT collation for ('foo' COLLATE "de_DE");
2427024270
a subtransaction ID.
2427124271
</para></entry>
2427224272
</row>
24273+
24274+
<row>
24275+
<entry role="func_table_entry"><para role="func_signature">
24276+
<indexterm>
24277+
<primary>pg_get_multixact_members</primary>
24278+
</indexterm>
24279+
<function>pg_get_multixact_members</function> ( <parameter>multixid</parameter> <type>xid</type> )
24280+
<returnvalue>setof record</returnvalue>
24281+
( <parameter>xid</parameter> <type>xid</type>,
24282+
<parameter>mode</parameter> <type>text</type> )
24283+
</para>
24284+
<para>
24285+
Returns the transaction ID and lock mode for each member of the
24286+
specified multixact ID. The lock modes <literal>forupd</literal>,
24287+
<literal>fornokeyupd</literal>, <literal>sh</literal>, and
24288+
<literal>keysh</literal> correspond to the row-level locks
24289+
<literal>FOR UPDATE</literal>, <literal>FOR NO KEY UPDATE</literal>,
24290+
<literal>FOR SHARE</literal>, and <literal>FOR KEY SHARE</literal>,
24291+
respectively, as described in <xref linkend="locking-rows"/>. Two
24292+
additional modes are specific to multixacts:
24293+
<literal>nokeyupd</literal>, used by updates that do not modify key
24294+
columns, and <literal>upd</literal>, used by updates or deletes that
24295+
modify key columns.
24296+
</para></entry>
24297+
</row>
2427324298
</tbody>
2427424299
</tgroup>
2427524300
</table>
@@ -24278,7 +24303,8 @@ SELECT collation for ('foo' COLLATE "de_DE");
2427824303
The internal transaction ID type <type>xid</type> is 32 bits wide and
2427924304
wraps around every 4 billion transactions. However,
2428024305
the functions shown in <xref linkend="functions-pg-snapshot"/>, except
24281-
<function>age</function> and <function>mxid_age</function>, use a
24306+
<function>age</function>, <function>mxid_age</function>, and
24307+
<function>pg_get_multixact_members</function>, use a
2428224308
64-bit type <type>xid8</type> that does not wrap around during the life
2428324309
of an installation, and can be converted to <type>xid</type> by casting if
2428424310
required. The data type <type>pg_snapshot</type> stores information about

doc/src/sgml/maintenance.sgml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,10 @@ HINT: Stop the postmaster and vacuum that database in single-user mode.
741741
careful aging management, storage cleanup, and wraparound handling.
742742
There is a separate storage area which holds the list of members in
743743
each multixact, which also uses a 32-bit counter and which must also
744-
be managed.
744+
be managed. The system function
745+
<function>pg_get_multixact_members()</function> described in
746+
<xref linkend="functions-pg-snapshot"/> can be used to examine the
747+
transaction IDs associated with a multixact ID.
745748
</para>
746749

747750
<para>

0 commit comments

Comments
 (0)