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

Поиск
Список
Период
Сортировка
От Richard Guo
Тема Assert failure on bms_equal(child_joinrel->relids, child_joinrelids)
Дата
Msg-id CAMbWs49NCNbyubZWgci3o=_OTY=snCfAPtMnM-32f3mm-K-Ckw@mail.gmail.com
обсуждение исходный текст
Ответы Re: Assert failure on bms_equal(child_joinrel->relids, child_joinrelids)  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
This Assert failure can be reproduced with the query below.

create table part_tbl (a integer) partition by range (a);
create table part_tbl1 partition of part_tbl for values from (0) to (100);
set enable_partitionwise_join to on;

explain (costs off)
select * from part_tbl t1
    left join part_tbl t2 on t1.a = t2.a
    left join part_tbl t3 on t2.a = t3.a;
server closed the connection unexpectedly

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.

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.

Thanks
Richard
Вложения

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

Предыдущее
От: Melih Mutlu
Дата:
Сообщение: Re: [PATCH] Reuse Workers and Replication Slots during Logical Replication
Следующее
От: Amit Langote
Дата:
Сообщение: Re: remaining sql/json patches