agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Avoid useless calls in pg_get_multixact_stats()
Date: Wed, 01 Jul 2026 03:17:41 +0000
Message-ID: <E1welSI-000r9Z-0D@gemulon.postgresql.org> (raw)

Avoid useless calls in pg_get_multixact_stats()

MultiXactOffsetStorageSize() and GetMultiXactInfo() are called to gather
the information reported by the function, but were wasteful for the case
where a role does not have the privileges of pg_read_all_stats, where we
return a set of NULLs.  These calls are moved to the code path where
their results are used.

Author: Ranier Vilela <ranier.vf@gmail.com>
Discussion: https://postgr.es/m/CAEudQAonQh7be=wOR-CJFW=bgMBz5wW_bv4t0OFxbgn-794JCQ@mail.gmail.com
Backpatch-through: 19

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/b542d556670586ebadf380102f6ead920609e592

Modified Files
--------------
src/backend/utils/adt/multixactfuncs.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)



view thread (2+ messages)

Message-ID: <E1welSI-000r9Z-0D@gemulon.postgresql.org>
Permalink:  ../E1welSI-000r9Z-0D@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1welSI-000r9Z-0D@gemulon.postgresql.org

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Avoid useless calls in pg_get_multixact_stats()
  In-Reply-To: <E1welSI-000r9Z-0D@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox