Skip to content

Commit f555153

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 9d14d40 commit f555153

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
@@ -27184,6 +27184,31 @@ SELECT currval(pg_get_serial_sequence('sometable', 'id'));
2718427184
details.
2718527185
</para></entry>
2718627186
</row>
27187+
27188+
<row>
27189+
<entry role="func_table_entry"><para role="func_signature">
27190+
<indexterm>
27191+
<primary>pg_get_multixact_members</primary>
27192+
</indexterm>
27193+
<function>pg_get_multixact_members</function> ( <parameter>multixid</parameter> <type>xid</type> )
27194+
<returnvalue>setof record</returnvalue>
27195+
( <parameter>xid</parameter> <type>xid</type>,
27196+
<parameter>mode</parameter> <type>text</type> )
27197+
</para>
27198+
<para>
27199+
Returns the transaction ID and lock mode for each member of the
27200+
specified multixact ID. The lock modes <literal>forupd</literal>,
27201+
<literal>fornokeyupd</literal>, <literal>sh</literal>, and
27202+
<literal>keysh</literal> correspond to the row-level locks
27203+
<literal>FOR UPDATE</literal>, <literal>FOR NO KEY UPDATE</literal>,
27204+
<literal>FOR SHARE</literal>, and <literal>FOR KEY SHARE</literal>,
27205+
respectively, as described in <xref linkend="locking-rows"/>. Two
27206+
additional modes are specific to multixacts:
27207+
<literal>nokeyupd</literal>, used by updates that do not modify key
27208+
columns, and <literal>upd</literal>, used by updates or deletes that
27209+
modify key columns.
27210+
</para></entry>
27211+
</row>
2718727212
</tbody>
2718827213
</tgroup>
2718927214
</table>
@@ -27192,7 +27217,8 @@ SELECT currval(pg_get_serial_sequence('sometable', 'id'));
2719227217
The internal transaction ID type <type>xid</type> is 32 bits wide and
2719327218
wraps around every 4 billion transactions. However,
2719427219
the functions shown in <xref linkend="functions-pg-snapshot"/>, except
27195-
<function>age</function> and <function>mxid_age</function>, use a
27220+
<function>age</function>, <function>mxid_age</function>, and
27221+
<function>pg_get_multixact_members</function>, use a
2719627222
64-bit type <type>xid8</type> that does not wrap around during the life
2719727223
of an installation and can be converted to <type>xid</type> by casting if
2719827224
required; see <xref linkend="transaction-id"/> for details.

doc/src/sgml/maintenance.sgml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,10 @@ HINT: Execute a database-wide VACUUM in that database.
761761
careful aging management, storage cleanup, and wraparound handling.
762762
There is a separate storage area which holds the list of members in
763763
each multixact, which also uses a 32-bit counter and which must also
764-
be managed.
764+
be managed. The system function
765+
<function>pg_get_multixact_members()</function> described in
766+
<xref linkend="functions-pg-snapshot"/> can be used to examine the
767+
transaction IDs associated with a multixact ID.
765768
</para>
766769

767770
<para>

0 commit comments

Comments
 (0)