Re: Remove traces of long in dynahash.c

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Dean Rasheed <dean.a.rasheed@gmail.com>
Cc: Peter Eisentraut <peter@eisentraut.org>, Tom Lane <tgl@sss.pgh.pa.us>, Chao Li <li.evan.chao@gmail.com>, Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-09-10T05:33:40Z
Lists: pgsql-hackers
On Tue, Sep 09, 2025 at 10:28:13AM +0100, Dean Rasheed wrote:
> So I think there's no point in adding that cap, or any additional
> checks in ExecChooseHashTableSize().

You are right that this hardcoded limit introduced in the previous
patch was useless.  So I have removed that, and applied the result.
Thanks for the suggestion.

Regarding removing the next power functions in dynahash.c, I am not
sure if it is worth bothering much.  Now that dynahash.h is removed,
all the code duplication that was in the backend, without the
hardcoded thresholds, is removed.
--
Michael

Commits

  1. Remove dynahash.h

  2. Replace callers of dynahash.h's my_log() by equivalent in pg_bitutils.h

  3. Change dynahash.c and hsearch.h to use int64 instead of long