Re: Reduce memory overheads for storing a Memoize tuple - Mailing list pgsql-hackers

From Chao Li
Subject Re: Reduce memory overheads for storing a Memoize tuple
Date
Msg-id 66E937DA-9930-4E50-9239-036D7D1B849E@gmail.com
Whole thread
Responses Re: Multi-Entry Indexing for GiST & SP-GiST
Re: Multi-Entry Indexing for GiST & SP-GiST
Re: Reduce memory overheads for storing a Memoize tuple
List pgsql-hackers

> On Aug 5, 2026, at 13:23, David Rowley <dgrowleyml@gmail.com> wrote:
>
> On Mon, 3 Aug 2026 at 16:52, Chao Li <li.evan.chao@gmail.com> wrote:
>> The optimized data structure looks good to me. The test result on my side exactly matches yours: 3583kB vs. 2801kB.
Ihad to turn off hash join, otherwise the planner always chose a parallel hash join. 
>
> Thanks for looking and checking.
>
>> I have only one nitpick. MAXALIGN(sizeof(MinimalTuple)) appears 4 times. Would it make sense to define a macro for
it,say MEMOIZE_TUPLE_LINK_SIZE? 
>
> Good idea. Here's a new patch with that adjustment made.
>
> David
> <v2-0001-Reduce-memory-overheads-for-storing-a-Memoize-tup.patch>

V2 LGTM. I also reran the tests, everything is good.

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/







Attachment

pgsql-hackers by date:

Previous
From: Rafia Sabih
Date:
Subject: Re: [PATCH] Add tests for src/backend/nodes/extensible.c
Next
From: Andrey Borodin
Date:
Subject: Support specialized B-tree page searches