-
Notifications
You must be signed in to change notification settings - Fork 670
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support EXPLAIN ANALYZE EXECUTE and EXPLAIN EXECUTE #4068
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4068 +/- ##
==========================================
+ Coverage 90.69% 90.73% +0.03%
==========================================
Files 186 186
Lines 35762 35804 +42
==========================================
+ Hits 32436 32486 +50
+ Misses 3326 3318 -8 |
1fe56ff
to
306de49
Compare
cab0edf
to
5634d3a
Compare
c145f5e
to
cb61b40
Compare
cb61b40
to
c04aabb
Compare
/* | ||
* ExecutorBoundParams returns the bound parameters of the current ongoing call | ||
* to ExecutorRun. This is meant to be used by UDFs which need to access bound | ||
* parameters. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what happens when a PL/pgSQL UDF calls other PL/pgSQL UDFs? We'd be in multiple levels of ExecutorRun. Could we lose the executorBoundParams?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed & added a test which would fail if this is not handled properly.
b34e3be
to
027e858
Compare
@@ -128,6 +134,9 @@ CitusExecutorRun(QueryDesc *queryDesc, | |||
{ | |||
DestReceiver *dest = queryDesc->dest; | |||
|
|||
ParamListInfo savedBoundParams = executorBoundParams; | |||
executorBoundParams = queryDesc->params; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could use a comment on why we do this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
6cc581d
to
84a8e92
Compare
84a8e92
to
fa9ce10
Compare
fa9ce10
to
0c2f4ef
Compare
0c2f4ef
to
7b74eca
Compare
DESCRIPTION: Support EXPLAIN ANALYZE EXECUTE and EXPLAIN EXECUTE.
Fixes #4074, #2009, #982.
To support EXPLAIN ANALYZE EXECUTE:
pqSendQueryParams()
doesn't accept multiple queries.worker_save_query_explain_analyze()
to use the bound parameters when executing the task query.To support EXPLAIN EXECUTE: Fix
FetchRemoteExplainFromWorkers
to send bound params along with the EXPLAIN query.