Re: Change GUC hashtable to use simplehash? - Mailing list pgsql-hackers

From John Naylor
Subject Re: Change GUC hashtable to use simplehash?
Date
Msg-id CANWCAZZaft9M4h3hS-wJcQA_KC0-oCHVbCfC5GVpRC6Jx6MZAw@mail.gmail.com
Whole thread Raw
In response to Re: Change GUC hashtable to use simplehash?  (Jeff Davis <pgsql@j-davis.com>)
List pgsql-hackers
On Thu, Mar 28, 2024 at 12:37 PM Jeff Davis <pgsql@j-davis.com> wrote:
>
> > v21-0003 adds a new file hashfn_unstable.c for convenience functions
> > and converts all the duplicate frontend uses of hash_string_pointer.
>
> Why not make hash_string() inline, too? I'm fine with it either way,
> I'm just curious why you went to the trouble to create a new .c file so
> it didn't have to be inlined.

Yeah, it's a bit strange looking in isolation, and I'm not sure I'll
go that route. When I was thinking of this, I also had dynahash and
dshash in mind, which do indirect calls, even if the function is
defined in the same file. That would still work with an inline
definition in the header, just duplicated in the different translation
units. Maybe that's not worth worrying about, since I imagine use
cases with indirect calls will remain rare.



pgsql-hackers by date:

Previous
From: Andy Fan
Date:
Subject: Re: a wrong index choose when statistics is out of date
Next
From: Tomas Vondra
Date:
Subject: Re: pg_combinebackup --copy-file-range