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 <[email protected]>
Discussion: 
https://postgr.es/m/CAEudQAonQh7be=wOR-CJFW=bgmbz5ww_bv4t0ofxbgn-794...@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(-)

Reply via email to