pgsql: Avoid extra AggCheckCallContext() checks in ordered-set aggregat

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Avoid extra AggCheckCallContext() checks in ordered-set aggregat
Дата
Msg-id E1W0ytf-0005ba-TI@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Avoid extra AggCheckCallContext() checks in ordered-set aggregates.

In the transition functions, we don't really need to recheck this after the
first call.  I had been feeling paranoid about possibly getting a non-null
argument value in some other context; but it's probably game over anyway
if we have a non-null "internal" value that's not what we are expecting.

In the final functions, the general convention in pre-existing final
functions seems to be that an Assert() is good enough, so do it like that
here too.

This seems to save a few tenths of a percent of overall query runtime,
which isn't much, but still it's just overhead if there's not a plausible
case where the checks would fire.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/847e46abc92333a5a948d8fa886604832c1db238

Modified Files
--------------
src/backend/utils/adt/orderedsetaggs.c |   42 +++++++-------------------------
1 file changed, 9 insertions(+), 33 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Save a few cycles in advance_transition_function().
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: pgsql: Fix pause_at_recovery_target + recovery_target_inclusive combina