Re: type cache cleanup improvements

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Teodor Sigaev <teodor(at)sigaev(dot)ru>
Cc: Aleksander Alekseev <aleksander(at)timescale(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: type cache cleanup improvements
Date: 2024-03-13 05:47:55
Message-ID: ZfE-C_o0I1lhAnMw@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrei Lepikhov 2024-03-13 05:52:50 Re: POC, WIP: OR-clause support for indexes
Previous Message Peter Smith 2024-03-13 05:46:23 Re: Improve the connection failure error messages