mirror of https://github.com/citusdata/citus.git
Do not allow unresolved parameters in INSERT...SELECT
parent
535c535010
commit
1ca9a5b867
|
@ -595,6 +595,16 @@ CreateDistributedPlan(uint64 planId, Query *originalQuery, Query *query, ParamLi
|
|||
|
||||
if (InsertSelectIntoDistributedTable(originalQuery))
|
||||
{
|
||||
if (hasUnresolvedParams)
|
||||
{
|
||||
/*
|
||||
* Unresolved parameters can cause performance regressions in
|
||||
* INSERT...SELECT when the partition column is a parameter
|
||||
* because we don't perform any additional pruning in the executor.
|
||||
*/
|
||||
return NULL;
|
||||
}
|
||||
|
||||
distributedPlan =
|
||||
CreateInsertSelectPlan(originalQuery, plannerRestrictionContext);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue