On Thu, Jun 12, 2025 at 03:10:56PM -0500, Nathan Bossart wrote: > Barring comments/objections, I'll plan on committing/back-patching this in > the near future.
Here is what I have staged for commit. I ended up moving it to the "Transaction ID and Snapshot Information Functions" table, which is what I think you had originally proposed. Creating a new section for this seemed unnecessary, and this table already has one multixact-related function. -- nathan
>From a65eb067ff48d8ea1f4b12e437b0a00d0dac54a2 Mon Sep 17 00:00:00 2001 From: Nathan Bossart <nat...@postgresql.org> Date: Fri, 27 Jun 2025 14:33:30 -0500 Subject: [PATCH v6 1/1] Document pg_get_multixact_members(). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Oversight in commit 0ac5ad5134. Author: Sami Imseih <samims...@gmail.com> Co-authored-by: Álvaro Herrera <alvhe...@kurilemu.de> Reviewed-by: Ashutosh Bapat <ashutosh.bapat....@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 --- doc/src/sgml/func.sgml | 25 +++++++++++++++++++++++++ doc/src/sgml/maintenance.sgml | 5 ++++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 224d4fe5a9f..d2968a2d175 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -27687,6 +27687,31 @@ acl | {postgres=arwdDxtm/postgres,foo=r/postgres} 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> diff --git a/doc/src/sgml/maintenance.sgml b/doc/src/sgml/maintenance.sgml index 600e4b3f2f3..e7a9f58c015 100644 --- a/doc/src/sgml/maintenance.sgml +++ b/doc/src/sgml/maintenance.sgml @@ -779,7 +779,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> -- 2.39.5 (Apple Git-154)