| From: | Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> |
|---|---|
| To: | David Rowley <dgrowleyml(at)gmail(dot)com> |
| Cc: | PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Reduce memory overheads for storing a Memoize tuple |
| Date: | 2026-08-05 06:28:24 |
| Message-ID: | 66E937DA-9930-4E50-9239-036D7D1B849E@gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
> On Aug 5, 2026, at 13:23, David Rowley <dgrowleyml(at)gmail(dot)com> wrote:
>
> On Mon, 3 Aug 2026 at 16:52, Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> wrote:
>> The optimized data structure looks good to me. The test result on my side exactly matches yours: 3583kB vs. 2801kB. I had 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/
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Hayato Kuroda (Fujitsu) | 2026-08-05 06:43:43 | RE: CREATE SUBSCRIPTION ... SERVER vs. pg_dump, etc. |
| Previous Message | Chao Li | 2026-08-05 05:52:36 | Re: Avoid building stderr message if possible |