From 447c7ecdd46317c12a52042b565ef09cf4b1584f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96nder=20Kalac=C4=B1?= Date: Fri, 20 Nov 2020 09:54:04 +0100 Subject: [PATCH] Enable parallel query on EXPLAIN ANALYZE (#4325) It seems that we forgot to pass the revelant flag to enable Postgres' parallel query capabilities on the shards when user does EXPLAIN ANALYZE on a distributed table. (cherry picked from commit b0ddbbd33aaebeaae92fbb6171b6066f6e3c271a) Conflicts: src/backend/distributed/planner/multi_explain.c --- src/backend/distributed/planner/multi_explain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/distributed/planner/multi_explain.c b/src/backend/distributed/planner/multi_explain.c index 3485dda93..43e53e781 100644 --- a/src/backend/distributed/planner/multi_explain.c +++ b/src/backend/distributed/planner/multi_explain.c @@ -960,7 +960,7 @@ worker_save_query_explain_analyze(PG_FUNCTION_ARGS) INSTR_TIME_SET_CURRENT(planStart); - PlannedStmt *plan = pg_plan_query(query, 0, NULL); + PlannedStmt *plan = pg_plan_query(query, CURSOR_OPT_PARALLEL_OK, NULL); INSTR_TIME_SET_CURRENT(planDuration); INSTR_TIME_SUBTRACT(planDuration, planStart);