Re: [Proposal] Expose internal MultiXact member count function for efficient monitoring

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: [Proposal] Expose internal MultiXact member count function for efficient monitoring
Дата
Msg-id aKQac2ZrY4UWBORR@paquier.xyz
обсуждение исходный текст
Ответ на Re: [Proposal] Expose internal MultiXact member count function for efficient monitoring  (Naga Appani <nagnrik@gmail.com>)
Ответы Re: [Proposal] Expose internal MultiXact member count function for efficient monitoring
Список pgsql-hackers
On Mon, Aug 18, 2025 at 08:32:39PM -0500, Naga Appani wrote:
> Thanks a lot for taking the time to review this patch and share your thoughts.
>
> Here’s a short summary of what has changed in v5:
> - Added the new pg_get_multixact_stats() function in multixactfuncs.c.
> - Fixed the misleading “atomic read” comment in the accessor.
> - Clarified documentation: thresholds are described in terms of
> counts, since that’s what the code uses.
> - Added a members_bytes column in pg_get_multixact_stats() to give
> users a rough size estimate (num_members * 5), while making it clear
> this is layout-dependent.
>
> Please see my in-line replies below.

FWIW, I think that you should be a bit more careful before sending
updated patch sets.  You have missed an extra point I have raised
upthread about the refactoring pieces: the switch from
ReadMultiXactCounts() to GetMultiXactInfo() can be done in a patch of
its own.

So I have extracted this part from your latest patch, and applied it
independently of the SQL function business.  Now we are in an
advantageous position on HEAD: even if we do not conclude about the
SQL function to show the mxact numbers and offsets, we have the
function that gives an access to the data you are looking for.  In
short, it is now possible to provide an equivalent of the feature you
want outside of core.  Not saying that the patch cannot be useful, but
such refactoring pieces open more possibilities, and offer a cleaner
commit history with less churn in the main patches.
--
Michael

Вложения

В списке pgsql-hackers по дате отправления: