Skip to content

Commit a167e65

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 0fb496c commit a167e65

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
@@ -24794,6 +24794,31 @@ SELECT collation for ('foo' COLLATE "de_DE");
2479424794
a subtransaction ID.
2479524795
</para></entry>
2479624796
</row>
24797+
24798+
<row>
24799+
<entry role="func_table_entry"><para role="func_signature">
24800+
<indexterm>
24801+
<primary>pg_get_multixact_members</primary>
24802+
</indexterm>
24803+
<function>pg_get_multixact_members</function> ( <parameter>multixid</parameter> <type>xid</type> )
24804+
<returnvalue>setof record</returnvalue>
24805+
( <parameter>xid</parameter> <type>xid</type>,
24806+
<parameter>mode</parameter> <type>text</type> )
24807+
</para>
24808+
<para>
24809+
Returns the transaction ID and lock mode for each member of the
24810+
specified multixact ID. The lock modes <literal>forupd</literal>,
24811+
<literal>fornokeyupd</literal>, <literal>sh</literal>, and
24812+
<literal>keysh</literal> correspond to the row-level locks
24813+
<literal>FOR UPDATE</literal>, <literal>FOR NO KEY UPDATE</literal>,
24814+
<literal>FOR SHARE</literal>, and <literal>FOR KEY SHARE</literal>,
24815+
respectively, as described in <xref linkend="locking-rows"/>. Two
24816+
additional modes are specific to multixacts:
24817+
<literal>nokeyupd</literal>, used by updates that do not modify key
24818+
columns, and <literal>upd</literal>, used by updates or deletes that
24819+
modify key columns.
24820+
</para></entry>
24821+
</row>
2479724822
</tbody>
2479824823
</tgroup>
2479924824
</table>
@@ -24802,7 +24827,8 @@ SELECT collation for ('foo' COLLATE "de_DE");
2480224827
The internal transaction ID type <type>xid</type> is 32 bits wide and
2480324828
wraps around every 4 billion transactions. However,
2480424829
the functions shown in <xref linkend="functions-pg-snapshot"/>, except
24805-
<function>age</function> and <function>mxid_age</function>, use a
24830+
<function>age</function>, <function>mxid_age</function>, and
24831+
<function>pg_get_multixact_members</function>, use a
2480624832
64-bit type <type>xid8</type> that does not wrap around during the life
2480724833
of an installation, and can be converted to <type>xid</type> by casting if
2480824834
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
@@ -759,7 +759,10 @@ HINT: Stop the postmaster and vacuum that database in single-user mode.
759759
careful aging management, storage cleanup, and wraparound handling.
760760
There is a separate storage area which holds the list of members in
761761
each multixact, which also uses a 32-bit counter and which must also
762-
be managed.
762+
be managed. The system function
763+
<function>pg_get_multixact_members()</function> described in
764+
<xref linkend="functions-pg-snapshot"/> can be used to examine the
765+
transaction IDs associated with a multixact ID.
763766
</para>
764767

765768
<para>

0 commit comments

Comments
 (0)