summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavan Deolasee2017-04-18 12:05:53 +0000
committerPavan Deolasee2017-05-05 04:59:34 +0000
commit02883b212885677e3873307c904449af9c46409e (patch)
tree415437d61fe85d1efce4b71f440b3deafe363352
parent69fba376ab646b51e9645b302bc28b2c02d6779a (diff)
Use already created EState while explaining FQS-ed query.
This ensures that we get details about supplied parameters correctly.
-rw-r--r--src/backend/commands/explain.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/backend/commands/explain.c b/src/backend/commands/explain.c
index 38dec4d5e4..23496b4f8f 100644
--- a/src/backend/commands/explain.c
+++ b/src/backend/commands/explain.c
@@ -3614,13 +3614,9 @@ ExplainRemoteQuery(RemoteQuery *plan, PlanState *planstate, List *ancestors, Exp
plan->scan.plan.targetlist = lappend(plan->scan.plan.targetlist,
makeTargetEntry((Expr *) dummy, 1, "QUERY PLAN", false));
- /* Execute query on the data nodes */
- estate = CreateExecutorState();
-
+ estate = planstate->state;
oldcontext = MemoryContextSwitchTo(estate->es_query_cxt);
- estate->es_snapshot = GetActiveSnapshot();
-
node = ExecInitRemoteQuery(step, estate, 0);
MemoryContextSwitchTo(oldcontext);
result = ExecRemoteQuery(node);