Refactor ReadMultiXactCounts() into GetMultiXactInfo()
authorMichael Paquier <michael@paquier.xyz>
Tue, 19 Aug 2025 05:04:09 +0000 (14:04 +0900)
committerMichael Paquier <michael@paquier.xyz>
Tue, 19 Aug 2025 05:04:09 +0000 (14:04 +0900)
commita977e419ee6ee15cb7bd45d7c9b7540cf183d1e2
treef02d422927c384b90c8a9f9cfde1144c2a38bb9a
parent9b7eb6f02e8d4affb225dd0aa239c8e7e0ff2cba
Refactor ReadMultiXactCounts() into GetMultiXactInfo()

This provides a single entry point to access some information about the
state of MultiXacts, able to return some data about multixacts offsets
and counts.  Originally this function was only able to return some
information about the number of multixacts and multixact members,
extended here to provide some data about the oldest multixact ID in use
and the oldest offset, if known.

This change has been proposed in a patch that aims at providing more
monitoring capabilities for multixacts, and it is useful on its own.
GetMultiXactInfo() is added to multixact.h, becoming available for
out-of-core code.

Extracted from a larger patch by the same author.

Author: Naga Appani <nagnrik@gmail.com>
Reviewed-by: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/CA+QeY+AAsYK6WvBW4qYzHz4bahHycDAY_q5ECmHkEV_eB9ckzg@mail.gmail.com
src/backend/access/transam/multixact.c
src/include/access/multixact.h