Re: Compilation issues for HASH_STATISTICS and HASH_DEBUG options

David Rowley <dgrowleyml@gmail.com>

From: David Rowley <dgrowleyml@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Michael Paquier <michael@paquier.xyz>, "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>, "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>
Date: 2025-08-18T23:21:06Z
Lists: pgsql-hackers
On Tue, 19 Aug 2025 at 01:34, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> David Rowley <dgrowleyml@gmail.com> writes:
> > I've purposefully left references to HASH_DEBUG in the "Original
> > comments" section near the top of dynahash.c. That comment also
> > references function names that no longer exist.
>
> Hm, there is actually no part of that comment para that is accurate
> anymore, so I cannot imagine a reason for leaving it alone.  People
> who want to do archaeology can consult the git history.  How about
> reducing the para to
>
>  * HASH_STATISTICS causes some usage statistics to be maintained,
>  * which can be logged by calling hash_stats().

Ok. I pushed it like that. Thanks for looking.

David



Commits

  1. Remove HASH_DEBUG output from dynahash.c

  2. Use elog(DEBUG4) for dynahash.c statistics output

  3. Fix invalid format string in HASH_DEBUG code

  4. Fix failing -D HASH_STATISTICS builds

  5. Refactor initial hash lookup in dynahash.c

  6. Remove large fill factor support from dynahash.c.

  7. Remove broken and useless entry-count printing in HASH_DEBUG code.

  8. Partition the freelist for shared dynahash tables.