Re: Assert !bms_overlap(joinrel->relids, required_outer)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Assert !bms_overlap(joinrel->relids, required_outer)
Дата
Msg-id 1563018.1688055650@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Assert !bms_overlap(joinrel->relids, required_outer)  (Richard Guo <guofenglinux@gmail.com>)
Ответы Re: Assert !bms_overlap(joinrel->relids, required_outer)  (Richard Guo <guofenglinux@gmail.com>)
Список pgsql-hackers
Richard Guo <guofenglinux@gmail.com> writes:
> On Wed, Jun 28, 2023 at 10:09 PM Tom Lane <tgl@sss.pgh.pa.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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Assert !bms_overlap(joinrel->relids, required_outer)
Следующее
От: Jacob Champion
Дата:
Сообщение: Re: pg_dump needs SELECT privileges on irrelevant extension table