| From: | Aleksander Alekseev <aleksander(at)tigerdata(dot)com> |
|---|---|
| To: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
| Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: [PATCH] dynahash.c refactoring |
| Date: | 2026-11-03 10:19:09 |
| Message-ID: | CAJ7c6TM3QtAXAGJZRFgHkCNeHQ=1ZtGRsPaWZZqWVWKtvvu6yQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi Peter,
> > 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.
Thanks for the feedback. Here are the corrected patches.
--
Best regards,
Aleksander Alekseev
| Attachment | Content-Type | Size |
|---|---|---|
| v2-0001-Remove-hash_freeze.patch | text/x-patch | 5.5 KB |
| v2-0002-Make-hash_stats-static.patch | text/x-patch | 1.9 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Nazir Bilal Yavuz | 2026-11-03 10:23:26 | Re: Fix ReadStream handling when heap rescan strategy changes |
| Previous Message | Bertrand Drouvot | 2026-11-03 10:15:48 | Re: Report buffer access strategies in EXPLAIN |