Re: simplehash: preserve consistency in case of OOM

2023-11-17 Thread Andres Freund
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.

Re: simplehash: preserve consistency in case of OOM

2023-11-17 Thread Gurjeet Singh
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

Re: simplehash: preserve consistency in case of OOM

2023-11-17 Thread Jeff Davis
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

Re: simplehash: preserve consistency in case of OOM

2023-11-17 Thread Andres Freund
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