Re: move hash_any to utils/hash/hashfn.c

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: move hash_any to utils/hash/hashfn.c
Дата
Msg-id 20190125195455.yols67bv7lhekuon@alap3.anarazel.de
обсуждение исходный текст
Ответ на move hash_any to utils/hash/hashfn.c  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: move hash_any to utils/hash/hashfn.c  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: move hash_any to utils/hash/hashfn.c  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
Hi,

On 2019-01-25 16:35:18 -0300, Alvaro Herrera wrote:
> I just noticed (once again) that we have hash_any() declared in
> src/access/hash.h (the header file for the hash index AM) rather than
> somewhere in utils/, for no good reason other than perhaps there was no
> better place when it was introduced.  This means that some files that
> seem to just need hash_any end up pointlessly #including the whole AM
> world upon themselves.
> 
> Would anybody object too hard if I move hash_any() and friends to
> src/backend/utils/hash/hashfn.c and the declarations to
> src/include/utils/hashutils.h?

I hate the current split quite a bit, albeit for somewhat different
reasons. We make things like tag_hash, uint32_hash unnecessarily more
expensive by adding an entirely useless external function call. And
some of these can be fairly hot (e.g. for syscache).  So yea, let's
move this stuff together.

Greetings,

Andres Freund


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: move hash_any to utils/hash/hashfn.c
Следующее
От: Tom Lane
Дата:
Сообщение: Re: move hash_any to utils/hash/hashfn.c