Re: Change the signature of pgstat_report_vacuum() so that it's passed a Relation

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Change the signature of pgstat_report_vacuum() so that it's passed a Relation
Дата
Msg-id aUEMmcPV1E3A0fDr@paquier.xyz
обсуждение исходный текст
Ответ на Change the signature of pgstat_report_vacuum() so that it's passed a Relation  (Bertrand Drouvot <bertranddrouvot.pg@gmail.com>)
Ответы Re: Change the signature of pgstat_report_vacuum() so that it's passed a Relation
Список pgsql-hackers
On Tue, Dec 16, 2025 at 06:49:13AM +0000, Bertrand Drouvot wrote:
> While working on relfilenode statistics, Andres suggested that we pass the Relation
> to pgstat_report_vacuum() (instead of the parameters inherited from the Relation,
> (See [1])).
>
> That looks like a good idea to me as it reduces the number of parameters and it's
> consistent with pgstat_report_analyze().

Fine by me.  I can get behind the symmetry argument with
pgstat_report_analyze() for pgstat_report_vacuum().  Another
appoealing argument with this change is that it forces the callers of
pgstat_report_vacuum() to open a relation, enforcing the policy that
we need a lock of them before reporting stats.  I don't think that we
will ever have dozens of callers of pgstat_report_vacuum() in the
tree, but it makes the API contract cleaner IMO with a long-term
picture in mind.
--
Michael

Вложения

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