mirror of https://github.com/citusdata/citus.git
Merge pull request #2396 from citusdata/insert_select_parameters
Do not allow unresolved parameters in INSERT...SELECTpull/2404/head
commit
b2c3fd891b
|
@ -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