diff options
author | Pavan Deolasee | 2017-04-18 12:05:53 +0000 |
---|---|---|
committer | Pavan Deolasee | 2017-05-05 04:59:34 +0000 |
commit | 02883b212885677e3873307c904449af9c46409e (patch) | |
tree | 415437d61fe85d1efce4b71f440b3deafe363352 | |
parent | 69fba376ab646b51e9645b302bc28b2c02d6779a (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.c | 6 |
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); |