]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Avoid useless calls in pg_get_multixact_stats()
authorMichael Paquier <michael@paquier.xyz>
Wed, 1 Jul 2026 03:17:17 +0000 (12:17 +0900)
committerMichael Paquier <michael@paquier.xyz>
Wed, 1 Jul 2026 03:17:17 +0000 (12:17 +0900)
commitb542d556670586ebadf380102f6ead920609e592
treef193a691ad9691d466859203ada29a31e6dd9f2d
parent8db58ac8eec7402af1a746621fb2910f1673db0a
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
src/backend/utils/adt/multixactfuncs.c