Re: [PATCH] dynahash: add memory allocation failure check
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrey Borodin <x4mmm@yandex-team.ru>
Cc: m.korotkov@postgrespro.ru, pgsql-hackers@postgresql.org
Date: 2025-04-24T14:10:22Z
Lists: pgsql-hackers
Andrey Borodin <x4mmm@yandex-team.ru> writes: > While fixing this maybe use MemoryContextAllocZero() instead of subsequent MemSet()? 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. regards, tom lane
Commits
-
Avoid possibly-theoretical OOM crash hazard in hash_create().
- bc19f63f8010 18.0 landed
- f45bdb13397f 16.9 landed
- e384118559ef 17.5 landed