Don't allocate IndexAmRoutine dynamically?

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Don't allocate IndexAmRoutine dynamically?
Дата
Msg-id 20190625185011.k3znyh52nm2vck7s@alap3.anarazel.de
обсуждение исходный текст
Ответы Re: Don't allocate IndexAmRoutine dynamically?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi,

I think it might be worthwhile require that IndexAmRoutine returned by
amhandler are allocated statically. Right now we copy them into
local/cache memory contexts. That's not free and reduces branch/jump
target prediction rates.  For tableam we did the same, and that was
actually measurable.

It seems to me like there's not that many index AMs out there, so
changing the signature of amhandler() to require returning a const
pointer to a const object ought to both be enough of a warning, and not
too big a burden.

Comments?

Greetings,

Andres Freund



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

Предыдущее
От: Ashwin Agrawal
Дата:
Сообщение: Re: errbacktrace
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: [PATCH] Incremental sort (was: PoC: Partial sort)