Rename functions to alloc/free things in reorderbuffer.c

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Rename functions to alloc/free things in reorderbuffer.c
Дата
Msg-id c9e43d2d-8e83-444f-b111-430377368989@iki.fi
обсуждение исходный текст
Ответы Re: Rename functions to alloc/free things in reorderbuffer.c
Список pgsql-hackers
I noticed some weird naming conventions in reorderbuffer.c which are 
leftovers from a long time ago when reorderbuffer.c maintained its own 
small memory pools to reduce palloc/pfree overhead. For example:

extern Oid *ReorderBufferGetRelids(ReorderBuffer *rb, int nrelids);
extern void ReorderBufferReturnRelids(ReorderBuffer *rb, Oid *relids);

ReorderBufferGetRelids allocates an array with MemoryContextAlloc, and 
ReorderBufferReturnRelids just calls pfree. The pools are long gone, and 
now the naming looks weird.

Attached patch renames those functions and other such functions to use 
the terms Alloc/Free. I actually wonder if we should go further and 
remove these functions altogether, and change the callers to call 
MemoryContextAlloc directly. But I didn't do that yet.

Any objections?

-- 
Heikki Linnakangas
Neon (https://neon.tech)

Вложения

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