From: | Jeff Davis <pgsql(at)j-davis(dot)com> |
---|---|
To: | John Naylor <johncnaylorls(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Gurjeet Singh <gurjeet(at)singh(dot)im>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Change GUC hashtable to use simplehash? |
Date: | 2023-12-03 21:16:20 |
Message-ID: | a072ac527d7c0aee551784e97e1fffba5a457f49.camel@j-davis.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, 2023-11-29 at 20:31 +0700, John Naylor wrote:
> v5-0001 puts fash-hash as-is into a new header, named in a way to
> convey in-memory use e.g. hash tables.
>
> v5-0002 does the minimal to allow dynash to use this for string_hash,
> inlined but still calling strlen.
>
> v5-0003 shows one way to do a incremental interface. It might be okay
> for simplehash with fixed length keys, but seems awkward for strings.
>
> v5-0004 shows a bytewise incremental interface, with implementations
> for dynahash (getting rid of strlen) and guc hash.
I'm trying to follow the distinctions you're making between dynahash
and simplehash -- are you saying it's easier to do incremental hashing
with dynahash, and if so, why?
If I understood what Andres was saying, the exposed hash state would be
useful for writing a hash function like guc_name_hash(). But whether we
use simplehash or dynahash is a separate question, right?
Also, while the |= 0x20 is a nice trick for lowercasing, did we decide
that it's better than my approach in patch 0004 here:
https://www.postgresql.org/message-id/27a7a289d5b8f42e1b1e79b1bcaeef3a40583bd2.camel@j-davis.com
which optimizes exact hits (most GUC names are already folded) before
trying case folding?
Regards,
Jeff Davis
From | Date | Subject | |
---|---|---|---|
Next Message | David Rowley | 2023-12-03 22:08:00 | Re: Dumped SQL failed to execute with ERROR "GROUP BY position -1 is not in select list" |
Previous Message | Alexander Korotkov | 2023-12-03 20:52:30 | Re: Add semi-join pushdown to postgres_fdw |