Re: [PATCH] Change simple_heap_insert() to a macro

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: [PATCH] Change simple_heap_insert() to a macro
Дата
Msg-id ebc4b162-c0ed-06fc-7877-1e497a63d790@iki.fi
обсуждение исходный текст
Ответ на [PATCH] Change simple_heap_insert() to a macro  (Andrey Klychkov <aaklychkov@mail.ru>)
Ответы Re[2]: [PATCH] Change simple_heap_insert() to a macro
Список pgsql-hackers
On 12/10/2018 11:54, Andrey Klychkov wrote:
> Studying another question I noticed a small point for optimization.
> 
> In the src/backend/access/heap/heapam.c we have the function:
> 
> - * simple_heap_insert - insert a tuple
> - *
> - * Currently, this routine differs from heap_insert only in supplying
> - * a default command ID and not allowing access to the speedup options.
> - *
> - * This should be used rather than using heap_insert directly in most 
> places
> - * where we are modifying system catalogs.
> - */
> -Oid
> -simple_heap_insert(Relation relation, HeapTuple tup)
> -{
> - return heap_insert(relation, tup, GetCurrentCommandId(true), 0, NULL);
> -}
> 
> I changed it to a macro. See the attached patch.

simple_heap_insert() is used in catalog updates and such. Does that have 
any measurable performance impact?

- Heikki


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

Предыдущее
От: Andrey Klychkov
Дата:
Сообщение: [PATCH] Change simple_heap_insert() to a macro
Следующее
От: Andrey Klychkov
Дата:
Сообщение: Re[2]: [PATCH] Change simple_heap_insert() to a macro