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

Поиск
Список
Период
Сортировка
От Richard Guo
Тема Re: Assert !bms_overlap(joinrel->relids, required_outer)
Дата
Msg-id CAMbWs48KGwkgAE0jXZEfuAoomwCyPu6nNt2MxLG1y2gzXVDjmA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Assert !bms_overlap(joinrel->relids, required_outer)  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Assert !bms_overlap(joinrel->relids, required_outer)
Список pgsql-hackers

On Wed, Jun 28, 2023 at 6:28 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
For a real fix, I'm inclined to extend the loop that calculates
param_source_rels (in add_paths_to_joinrel) so that it also tracks
a set of incompatible relids that *must not* be present in the
parameterization of a proposed path.  This would basically include
OJ relids of OJs that partially overlap the target joinrel; maybe
we should also include the min RHS of such OJs.  Then we could
check that in try_nestloop_path.  I've not tried to code this yet.

I went ahead and drafted a patch based on this idea.  A little
differences include

* You mentioned that the incompatible relids might need to also include
the min_righthand of the OJs that are part of the target joinrel.  It
seems to me that we may need to also include the min_lefthand of such
OJs, because the parameterization of any proposed join path for the
target joinrel should not overlap anything in an OJ if the OJ is part of
this joinrel.

* I think we need to check the incompatible relids also in
try_hashjoin_path and try_mergejoin_path besides try_nestloop_path.

Thanks
Richard
Вложения

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

Предыдущее
От: "Drouvot, Bertrand"
Дата:
Сообщение: Re: Synchronizing slots from primary to standby
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Another incorrect comment for pg_stat_statements