Re: Fix doc about pg_get_multixact_stats()

Поиск
Список
Период
Сортировка
Искать

Re: Fix doc about pg_get_multixact_stats()

От:
Michael Paquier <michael@paquier.xyz>
Дата:
On Fri, Jun 26, 2026 at 07:15:37AM +0800, Chao Li wrote:
> 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?
> ```
>       
>         Only superusers and roles with privileges of the
>         pg_read_all_stats role can see details; other users
>         receive null values.
>       
> ```

Yeah, that looks like an improvement over the statu-quo.  I was
looking for something similar but we don't have many functions hidden
behind a role privilege.
--
Michael

Fix doc about pg_get_multixact_stats()

От:
Yingying Chen <cyy9255@gmail.com>
Дата:
Hi Hacker,

I found a small documentation issue in func-info.smgl:

   <para>
    The internal transaction ID type <type>xid</type> is 32 bits wide and
    wraps around every 4 billion transactions.  However,
    the functions shown in <xref linkend="functions-pg-snapshot"/>, except
    <function>age</function>, <function>mxid_age</function>, and
    <function>pg_get_multixact_members</function>, use a
    64-bit type <type>xid8</type> that does not wrap around during the life
    of an installation and can be converted to <type>xid</type> by casting if
    required;  see <xref linkend="transaction-id"/> for details.

Since pg_get_multixact_stats() was added in PG19, it should be added to this exception list.

Regards,
Yingying Chen
FAQ