Re: [Proposal] Adding callback support for custom statistics kinds
| От | Michael Paquier |
|---|---|
| Тема | Re: [Proposal] Adding callback support for custom statistics kinds |
| Дата | |
| Msg-id | aTIV8qfcIkht1Hgv@paquier.xyz обсуждение исходный текст |
| Ответ на | Re: [Proposal] Adding callback support for custom statistics kinds (Sami Imseih <samimseih@gmail.com>) |
| Ответы |
Re: [Proposal] Adding callback support for custom statistics kinds
|
| Список | pgsql-hackers |
On Thu, Dec 04, 2025 at 05:00:10PM -0600, Sami Imseih wrote: > Thanks for the input! Yes, this is a trade-off between putting > responsibility on the > extension vs core. The initial thought I had was exactly like yours, but it will > be easier to get something pushed if we make the core changes as minimal as > possible. If there are enough complaints in the future, this can be revisited. > Particularly if there is a common patterns for file cleanup, this > could be turned > into a core utility. Another way to shape it would be to have an in-core routine that provides a default logic for the actions to take depending on the write, read or discard state, with the state and a FILE* as arguments. The main pgstats file would call that, modules may decide to use it. > However, as discussed off-list, I do think moving the custom kind tests from > injection points to the new test module is a prerequisite. I rather > not have us push a new test module that is doing duplicate work as the injection > stats tests. > I worked on this refactoring today and plan to have a patch ready for review > by tomorrow. Cool, thanks! -- Michael
Вложения
В списке pgsql-hackers по дате отправления: