Re: Introduce WAIT_EVENT_EXTENSION and WAIT_EVENT_BUFFER_PIN

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Introduce WAIT_EVENT_EXTENSION and WAIT_EVENT_BUFFER_PIN
Дата
Msg-id ZGVjOujHAXEGXGVX@paquier.xyz
обсуждение исходный текст
Ответ на Re: Introduce WAIT_EVENT_EXTENSION and WAIT_EVENT_BUFFER_PIN  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
On Thu, May 18, 2023 at 07:48:26AM +0900, Michael Paquier wrote:
> Okay.  We are going to need an approach similar to what's done for
> src/backend/nodes where two things are generated in order to be able
> to have some of the wait event classes be treated as exceptions in the
> switch calling each function (pgstat_get_wait_event).  I'd assume:
> - Create the code calling the functions automatically, say in a
> wait_event_type.switch.c or something like that.  If a class has one
> single element, generate the code from it.
> - Create a second file with the functions and their internals, as the
> patch does now (like wait_event_type.funcs.c?), discarding classes
> with single elements.
> - Skip the creation of the enum structures for single-element classes,
> as well.

On top of that, why don't we just apply some inlining to all the
pgstat_get_wait_*() functions?  If we do that, even the existing
functions could see a benefit on top of the ones associated to classes
with single elements.  Inlining may not be always applied depending on
what the compiler wants, of course..
--
Michael

Вложения

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

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: Order changes in PG16 since ICU introduction
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Introduce WAIT_EVENT_EXTENSION and WAIT_EVENT_BUFFER_PIN