From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Richard Guo <guofenglinux(at)gmail(dot)com> |
Cc: | Michael Paquier <michael(at)paquier(dot)xyz>, Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Assert !bms_overlap(joinrel->relids, required_outer) |
Date: | 2023-06-29 16:20:50 |
Message-ID: | 1563018.1688055650@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Richard Guo <guofenglinux(at)gmail(dot)com> writes:
> On Wed, Jun 28, 2023 at 10:09 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Those cases will go through calc_non_nestloop_required_outer
>> which has
>> /* neither path can require rels from the other */
>> Assert(!bms_overlap(outer_paramrels, inner_path->parent->relids));
>> Assert(!bms_overlap(inner_paramrels, outer_path->parent->relids));
> Looking at these two assertions it occurred to me that shouldn't we
> check against top_parent_relids for an otherrel since paths are
> parameterized by top-level parents? We do that in try_nestloop_path.
Yeah, while looking at this I was wondering why try_mergejoin_path and
try_hashjoin_path don't do the same "Paths are parameterized by
top-level parents, so run parameterization tests on the parent relids"
dance that try_nestloop_path does. This omission is consistent with
that, but it's not obvious why it'd be okay to skip it for
non-nestloop joins. I guess we'd have noticed by now if it wasn't
okay, but ...
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Jacob Champion | 2023-06-29 16:24:32 | Re: pg_dump needs SELECT privileges on irrelevant extension table |
Previous Message | Tom Lane | 2023-06-29 16:16:49 | Re: Assert !bms_overlap(joinrel->relids, required_outer) |