Re: [PATCH] dynahash: add memory allocation failure check - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCH] dynahash: add memory allocation failure check
Date
Msg-id 1619050.1745503822@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PATCH] dynahash: add memory allocation failure check  (Andrey Borodin <x4mmm@yandex-team.ru>)
Responses Re: [PATCH] dynahash: add memory allocation failure check
List 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



pgsql-hackers by date:

Previous
From: Noah Misch
Date:
Subject: Re: pg_upgrade-breaking release
Next
From: Japin Li
Date:
Subject: Re: Disallow redundant indexes