Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Using ORCA for a partition with rewritten rules causes gp crash #5913
Greenplum version or build
It is possible to rewrite rules for an existing table's partition though in a case of partition exchange it is prohibited to use a table with rewritten rules. After adding rules to a partition legacy optimiser returns an error (it is ok) but ORCA causes gp crash.
Step to reproduce the behavior
create table t1 (id int, stamp date, amount int) with (appendonly=false) distributed by (id) partition by range (stamp) ( start ('2016-01-01') end ('2019-01-01') every(interval '1 year'), default partition extra ); select * from pg_partitions where tablename ='t1'; -- rank: 3, partition: t1_1_prt_4 create rule "_RETURN" as on select to t1_1_prt_4 do instead select 1 as id, current_date as stamp, 1 as amount; set optimizer=off; select * from t1; -- ERROR: plan contains range table with relstorage='v' (allpaths.c:346) set optimizer=on; select * from t1; -- [OPT]: Using default search strategy -- server closed the connection unexpectedly -- This probably means the server terminated abnormally -- before or while processing the request. -- The connection to the server was lost. Attempting reset: Failed.
There are two ways I think