Re: Fix doc about pg_get_multixact_stats()

Chao Li <li.evan.chao@gmail.com>

From: Chao Li <li.evan.chao@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Yingying Chen <cyy9255@gmail.com>, PostgreSQL-development <pgsql-hackers@lists.postgresql.org>
Date: 2026-06-25T23:15:37Z
Lists: pgsql-hackers

> On Jun 26, 2026, at 06:27, Michael Paquier <michael@paquier.xyz> wrote:
> 
> On Thu, Jun 25, 2026 at 07:49:58PM +0800, Yingying Chen wrote:
>> Since pg_get_multixact_stats() was added in PG19, it should be added to
>> this exception list.
> 
> Indeed.  Thanks for the patch.  Will fix.
> --
> Michael

While reviewing this patch, I found this statement for pg_get_multixact_stats() is a little misleading or unclear:
```
       <para>
        To use this function, you must have privileges of the
        <literal>pg_read_all_stats</literal> role.
       </para></entry>
```

From the implementation, for unprivileged (not super user and not pg_read_all_stats role) users, pg_get_multixact_stats doesn't raise an error, but just returns all NULL values. The current statement doesn't seem to explain that behavior clearly.

How about rephrasing it like this?
```
      <para>
        Only superusers and roles with privileges of the
        <literal>pg_read_all_stats</literal> role can see details; other users
        receive null values.
      </para></entry>
```

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/







Commits

  1. doc: Improve description of pg_get_multixact_stats()