Re: [PATCH] dynahash.c refactoring

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: Aleksander Alekseev <aleksander(at)tigerdata(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] dynahash.c refactoring
Date: 2026-11-02 13:40:45
Message-ID: 14213bd8-b1b3-45c0-b84d-cb18f3851df9@eisentraut.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 29.10.26 12:03, Aleksander Alekseev wrote:
> 0001: hash_freeze() has not been used since 5dfc198146 (Oct 2016). I
> suggest removing it.

This seems alright. If someone needs it, we can put it back.

> 0002: hash_destroy() is the only caller of hash_stats(). I suggest
> making the function static and place it under `#ifdef
> HASH_STATISTICS`.

I don't think this is an improvement. In general, I would like to keep
the amount of code covered by #ifdef's as small as possible. That way,
we reduce the chances that some code rots because it is not compiled by
default. We could make the function static, but I would avoid the
additional #ifdef's.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2026-11-02 14:10:08 Re: PoC: true in-place major version upgrades
Previous Message Peter Eisentraut 2026-11-02 13:33:25 Re: Let's drop support for named POSIX semaphores