On 2023-11-17 13:00:19 -0800, Jeff Davis wrote:
> Please tell me if you think the use of simplehash for a search_path
> cache is the wrong tool for the job.
No, seems fine. I just was curious - as you said, the older existing users
won't ever care about this case.
On Fri, Nov 17, 2023 at 12:13 PM Andres Freund wrote:
>
> On 2023-11-17 10:42:54 -0800, Jeff Davis wrote:
> > Right now, if allocation fails while growing a hashtable, it's left in
> > an inconsistent state and can't be used again.
+1 to the patch.
> I'm not against allowing this - but I am curi
On Fri, 2023-11-17 at 12:13 -0800, Andres Freund wrote:
> On 2023-11-17 10:42:54 -0800, Jeff Davis wrote:
> > Right now, if allocation fails while growing a hashtable, it's left
> > in
> > an inconsistent state and can't be used again.
>
> I'm not against allowing this - but I am curious, in which
Hi,
On 2023-11-17 10:42:54 -0800, Jeff Davis wrote:
> Right now, if allocation fails while growing a hashtable, it's left in
> an inconsistent state and can't be used again.
I'm not against allowing this - but I am curious, in which use cases is this
useful?
> @@ -446,10 +459,11 @@ SH_CREATE(Me
ri, 17 Nov 2023 10:24:03 -0800
Subject: [PATCH v1] simplehash: preserve consistency in case of OOM.
Compute size first, then allocate, then update the structure.
Previously, an out-of-memory when growing could leave the hashtable in
an inconsistent state.
---
src/include/lib/simpleh