Re: Assert failure on bms_equal(child_joinrel->relids, child_joinrelids)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Assert failure on bms_equal(child_joinrel->relids, child_joinrelids)
Дата
Msg-id 960560.1689955375@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Assert failure on bms_equal(child_joinrel->relids, child_joinrelids)  (Richard Guo <guofenglinux@gmail.com>)
Ответы Re: Assert failure on bms_equal(child_joinrel->relids, child_joinrelids)  (Richard Guo <guofenglinux@gmail.com>)
Список pgsql-hackers
Richard Guo <guofenglinux@gmail.com> writes:
> This should be an oversight in 9df8f903.  It seems that the new added
> function add_outer_joins_to_relids() does not cope well with child
> joins.  The 'input_relids' for a child join is the relid sets of child
> rels while 'othersj->min_xxxhand' refers to relids of parent rels.  So
> there would be problem when we add the relids of the pushed-down joins.

Indeed.  Adding the OJ relid itself works fine, but we won't get the
required matches when we scan the join_info_list.

> Instead of fixing add_outer_joins_to_relids() to cope with child joins,
> I'm wondering if we can build join relids for a child join from its
> parent by adjust_child_relids, something like attached.

That looks like a good solid solution.  Pushed with a bit of
editorialization --- mostly, that I put the test case into
partition_join.sql where there's already suitable test tables.

            regards, tom lane



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

Предыдущее
От: Etsuro Fujita
Дата:
Сообщение: Re: postgres_fdw: wrong results with self join + enable_nestloop off
Следующее
От: Bharath Rupireddy
Дата:
Сообщение: Re: Support worker_spi to execute the function dynamically.