mirror of https://github.com/citusdata/citus.git
Merge pull request #383 from citusdata/feature/pg_stat_statements
Copy toplevel queryId to citus' master statement.pull/1938/head
commit
a81771c58d
|
@ -153,8 +153,14 @@ multi_ExecutorStart(QueryDesc *queryDesc, int eflags)
|
||||||
* the later hooks, so we set a flag marking this as a distributed
|
* the later hooks, so we set a flag marking this as a distributed
|
||||||
* statement running on the master. That e.g. allows us to drop the
|
* statement running on the master. That e.g. allows us to drop the
|
||||||
* temp table later.
|
* temp table later.
|
||||||
|
*
|
||||||
|
* We copy the original statement's queryId, to allow
|
||||||
|
* pg_stat_statements and similar extension to associate the
|
||||||
|
* statement with the toplevel statement.
|
||||||
*/
|
*/
|
||||||
|
masterSelectPlan->queryId = queryDesc->plannedstmt->queryId;
|
||||||
queryDesc->plannedstmt = masterSelectPlan;
|
queryDesc->plannedstmt = masterSelectPlan;
|
||||||
|
|
||||||
eflags |= EXEC_FLAG_CITUS_MASTER_SELECT;
|
eflags |= EXEC_FLAG_CITUS_MASTER_SELECT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue