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
Список
Дерево обсуждения
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) Tom Lane <tgl@sss.pgh.pa.us>
Re: 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) Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Reuse child_relids in try_partitionwise_join was Re: Assert failure on bms_equal(child_joinrel->relids, child_joinrelids) Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Re: Reuse child_relids in try_partitionwise_join was Re: Assert failure on bms_equal(child_joinrel->relids, child_joinrelids) Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Re: Reuse child_relids in try_partitionwise_join was Re: Assert failure on bms_equal(child_joinrel->relids, child_joinrelids) Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Re: Reuse child_relids in try_partitionwise_join was Re: Assert failure on bms_equal(child_joinrel->relids, child_joinrelids) Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Re: Reuse child_relids in try_partitionwise_join was Re: Assert failure on bms_equal(child_joinrel->relids, child_joinrelids) David Christensen <david+pg@pgguru.net>
Re: Reuse child_relids in try_partitionwise_join was Re: Assert failure on bms_equal(child_joinrel->relids, child_joinrelids) Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Re: Reuse child_relids in try_partitionwise_join was Re: Assert failure on bms_equal(child_joinrel->relids, child_joinrelids) Robert Haas <robertmhaas@gmail.com>
Re: Reuse child_relids in try_partitionwise_join was Re: Assert failure on bms_equal(child_joinrel->relids, child_joinrelids) Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Re: Reuse child_relids in try_partitionwise_join was Re: Assert failure on bms_equal(child_joinrel->relids, child_joinrelids) Robert Haas <robertmhaas@gmail.com>
Re: Reuse child_relids in try_partitionwise_join was Re: Assert failure on bms_equal(child_joinrel->relids, child_joinrelids) David Christensen <david+pg@pgguru.net>
Re: Reuse child_relids in try_partitionwise_join was Re: Assert failure on bms_equal(child_joinrel->relids, child_joinrelids) Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Re: Reuse child_relids in try_partitionwise_join was Re: Assert failure on bms_equal(child_joinrel->relids, child_joinrelids) Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Re: Reuse child_relids in try_partitionwise_join was Re: Assert failure on bms_equal(child_joinrel->relids, child_joinrelids) Richard Guo <guofenglinux@gmail.com>
Re: Reuse child_relids in try_partitionwise_join was Re: Assert failure on bms_equal(child_joinrel->relids, child_joinrelids) Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Re: Reuse child_relids in try_partitionwise_join was Re: Assert failure on bms_equal(child_joinrel->relids, child_joinrelids) Richard Guo <guofenglinux@gmail.com>
Re: Reuse child_relids in try_partitionwise_join was Re: Assert failure on bms_equal(child_joinrel->relids, child_joinrelids) Richard Guo <guofenglinux@gmail.com>
Re: Reuse child_relids in try_partitionwise_join was Re: Assert failure on bms_equal(child_joinrel->relids, child_joinrelids) Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
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
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
Дата: