Re: [PATCH] dynahash: add memory allocation failure check

x4mmm@yandex-team.ru

From: Andrey Borodin <x4mmm@yandex-team.ru>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: m.korotkov@postgrespro.ru, pgsql-hackers@postgresql.org
Date: 2025-04-24T16:32:44Z
Lists: pgsql-hackers

> On 24 Apr 2025, at 19:10, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> 
> I thought about that but intentionally left it as-is, because that
> would force zeroing of the space reserved for the hashtable name too.
> That's unnecessary, and since it'd often be odd-sized it might result
> in a less efficient fill loop.

Well, that's just few hundred bytes at most. But I agree that makes sense.


Best regards, Andrey Borodin.






Commits

  1. Avoid possibly-theoretical OOM crash hazard in hash_create().