From 3a7e10a9b1cc5c79514fb9a1ac619cbaaba220ea Mon Sep 17 00:00:00 2001 From: Onder Kalaci Date: Thu, 20 Oct 2016 12:16:47 +0300 Subject: [PATCH] refactor definition of routable queries --- src/backend/distributed/executor/multi_server_executor.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/backend/distributed/executor/multi_server_executor.c b/src/backend/distributed/executor/multi_server_executor.c index ec3a3af2c..4a8b727b6 100644 --- a/src/backend/distributed/executor/multi_server_executor.c +++ b/src/backend/distributed/executor/multi_server_executor.c @@ -113,6 +113,10 @@ JobExecutorType(MultiPlan *multiPlan) * RouterExecutablePlan returns whether a multi-plan can be executed using the * router executor. Modify queries are always router executable, select queries * are router executable only if executorType is real time. + * + * With the multi task router executor, most of the assumptions in this function do not + * hold anymore. In the long term, we could consider adding a new field to workerJob + * and only execute router plannable queries with router executor. */ bool RouterExecutablePlan(MultiPlan *multiPlan, MultiExecutorType executorType) @@ -127,7 +131,7 @@ RouterExecutablePlan(MultiPlan *multiPlan, MultiExecutorType executorType) List *workerDependentTaskList = NIL; bool masterQueryHasAggregates = false; - /* TODO: this is a hacky solution to allow 0 shard INSERT ... SELECT */ + /* allow all INSERT ... SELECT queries (i.e., irrespective of taskCount) */ if (masterQuery == NULL) { return true;