Re: type cache cleanup improvements - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: type cache cleanup improvements
Date
Msg-id ZfE-C_o0I1lhAnMw@paquier.xyz
Whole thread Raw
In response to Re: type cache cleanup improvements  (Teodor Sigaev <teodor@sigaev.ru>)
Responses Re: type cache cleanup improvements
List pgsql-hackers
On Tue, Mar 12, 2024 at 06:55:41PM +0300, Teodor Sigaev wrote:
> Playing around I found one more place which could easily modified with
> hash_seq_init_with_hash_value() call.

I think that this patch should be split for clarity, as there are a
few things that are independently useful.  I guess something like
that:
- Introduction of hash_initial_lookup(), that simplifies 3 places of
dynahash.c where the same code is used.  The routine should be
inlined.
- The split in hash_seq_search to force a different type of search is
weird, complicating the dynahash interface by hiding what seems like a
search mode.  Rather than hasHashvalue that's hidden in the middle of
HASH_SEQ_STATUS, could it be better to have an entirely different API
for the search?  That should be a patch on its own, as well.
- The typcache changes.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Peter Smith
Date:
Subject: Re: Improve the connection failure error messages
Next
From: Andrei Lepikhov
Date:
Subject: Re: POC, WIP: OR-clause support for indexes