Getting "ERROR: did not find all requested child rels in append_rel_list" when enable_partition_pruning is on

Started by Rajkumar Raghuwanshiover 7 years ago2 messages
#1Rajkumar Raghuwanshi
rajkumar.raghuwanshi@enterprisedb.com

Hi,

I am getting "ERROR: did not find all requested child rels in
append_rel_list" when enable_partition_pruning is on for below test case.

CREATE TABLE test(c1 int, c2 int) PARTITION BY RANGE(c1);
CREATE TABLE test_p1 PARTITION OF test FOR VALUES FROM (minvalue) TO (0);
CREATE TABLE test_p2 PARTITION OF test FOR VALUES FROM (0) TO (maxvalue);
select * from (select * from test a union all select * from test b) ss
where (c1 >= c2);

postgres=# set enable_partition_pruning to off;
SET
postgres=# select * from (select * from test a union all select * from
test b) ss where (c1 >= c2);
c1 | c2
----+----
(0 rows)

postgres=#
postgres=# set enable_partition_pruning to on;
SET
postgres=# select * from (select * from test a union all select * from
test b) ss where (c1 >= c2);
ERROR: did not find all requested child rels in append_rel_list

Thanks & Regards,
Rajkumar Raghuwanshi
QMG, EnterpriseDB Corporation

#2Amit Langote
Langote_Amit_f8@lab.ntt.co.jp
In reply to: Rajkumar Raghuwanshi (#1)
Re: Getting "ERROR: did not find all requested child rels in append_rel_list" when enable_partition_pruning is on

On 2018/06/15 16:32, Rajkumar Raghuwanshi wrote:

Hi,

I am getting "ERROR: did not find all requested child rels in
append_rel_list" when enable_partition_pruning is on for below test case.

CREATE TABLE test(c1 int, c2 int) PARTITION BY RANGE(c1);
CREATE TABLE test_p1 PARTITION OF test FOR VALUES FROM (minvalue) TO (0);
CREATE TABLE test_p2 PARTITION OF test FOR VALUES FROM (0) TO (maxvalue);
select * from (select * from test a union all select * from test b) ss
where (c1 >= c2);

postgres=# set enable_partition_pruning to off;
SET
postgres=# select * from (select * from test a union all select * from
test b) ss where (c1 >= c2);
c1 | c2
----+----
(0 rows)

postgres=#
postgres=# set enable_partition_pruning to on;
SET
postgres=# select * from (select * from test a union all select * from
test b) ss where (c1 >= c2);
ERROR: did not find all requested child rels in append_rel_list

Thanks for the report. This appears to be the same problem as one being
discussed on the following thread where David Rowley even seems to have
posted a patch as a fix for this issue:

/messages/by-id/HE1PR03MB17068BB27404C90B5B788BCABA7B0@HE1PR03MB1706.eurprd03.prod.outlook.com

Thanks,
Amit