Re: Reducing memory consumed by RestrictInfo list translations in partitionwise join planning

From: Amit Langote <amitlangote09(at)gmail(dot)com>
To: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
Cc: David Rowley <dgrowleyml(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Dmitry Dolgov <9erthalion6(at)gmail(dot)com>, tomas(at)vondra(dot)me, vignesh C <vignesh21(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Richard Guo <guofenglinux(at)gmail(dot)com>
Subject: Re: Reducing memory consumed by RestrictInfo list translations in partitionwise join planning
Date: 2025-04-03 03:28:09
Message-ID: CA+HiwqH8OaVD8LOpON=h3UyzXBwj=hHzTF_46DGvoeXzRrkx9A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Apr 2, 2025 at 9:52 PM Ashutosh Bapat
<ashutosh(dot)bapat(dot)oss(at)gmail(dot)com> wrote:
> On Wed, Apr 2, 2025 at 1:00 PM Amit Langote <amitlangote09(at)gmail(dot)com> wrote:
> > I'm feeling good about this version, but let me know if you have any
> > further thoughts / comments.
>
> Thanks for incorporating the changes and fixing initial hash table size.
>
> + #define EC_DERIVES_HASH_THRESHOLD 32
>
> Given that the constant is being used only at a single place, we don't
> need a macro. But I am not against the macro.

Yeah, let's keep it, because it documents well.

> PFA patch set with some minor edits in 0003. Also I have edited commit
> message of 0001 and 0002.
>
> In the commit messages of 0002,
> 1. mentioning that the lookup happens only for join clause generation
> is not accurate, since we lookup EM = constant clauses as well which
> are not join clauses.
> 2. In the second paragraph em1 and em2 are mentioned without
> mentioning what are they. I have rephrased it so as to avoid
> mentioning names of structure member.

Incorporated, thanks.

I'll plan to commit these tomorrow barring objections.

--
Thanks, Amit Langote

Attachment Content-Type Size
v9-0002-Make-derived-clause-lookup-in-EquivalenceClass-mo.patch application/octet-stream 27.4 KB
v9-0001-Add-assertion-to-verify-derived-clause-has-consta.patch application/octet-stream 1.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Smith 2025-04-03 03:37:10 Re: Adding a '--clean-publisher-objects' option to 'pg_createsubscriber' utility.
Previous Message Hayato Kuroda (Fujitsu) 2025-04-03 03:15:06 Some codes refer slot()->{'slot_name'} but it is not defined