From: | Richard Guo <guofenglinux(at)gmail(dot)com> |
---|---|
To: | David Rowley <dgrowleyml(at)gmail(dot)com> |
Cc: | Andrei Lepikhov <lepihov(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Memoize ANTI and SEMI JOIN inner |
Date: | 2025-03-31 09:50:04 |
Message-ID: | CAMbWs492QOUxvMadX4OxGY+hc8Dq7jq44sR_+-M3YndJzQikNw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Mar 31, 2025 at 6:39 PM David Rowley <dgrowleyml(at)gmail(dot)com> wrote:
> On Mon, 31 Mar 2025 at 22:03, Richard Guo <guofenglinux(at)gmail(dot)com> wrote:
> > I reviewed this patch and I have some concerns about the following
> > code:
> >
> > if (extra->inner_unique &&
> > (inner_path->param_info == NULL ||
> > bms_num_members(inner_path->param_info->ppi_serials) <
> > list_length(extra->restrictlist)))
> > return NULL;
> >
> > I understand that this check is used to ensure that the entire join
> > condition is parameterized in the case of unique joins, so that we can
> > safely mark the cache entry as complete after reading the first tuple.
> > However, ppi_clauses includes join clauses available from all outer
> > rels, not just the current outer rel, while extra->restrictlist only
> > includes the restriction clauses for the current join. This means the
> > check could pass even if a restriction clause isn't parameterized, as
> > long as another join clause, which doesn't belong to the current join,
> > is included in ppi_clauses.
>
> Shouldn't you be more concerned about master here than the patch given
> that the code you pasted is from master?
Right. This code is from the master branch, not the patch. It caught
my attention while I was reviewing the patch and noticed it modifies
this code.
Thanks
Richard
From | Date | Subject | |
---|---|---|---|
Next Message | Ashutosh Bapat | 2025-03-31 10:00:40 | Re: Reducing memory consumed by RestrictInfo list translations in partitionwise join planning |
Previous Message | Andrei Lepikhov | 2025-03-31 09:46:08 | Re: Memoize ANTI and SEMI JOIN inner |