| From: | Andres Freund <andres(at)anarazel(dot)de> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: ExplainOneQuery_hook ignored for EXPLAIN EXECUTE |
| Date: | 2016-11-13 22:28:04 |
| Message-ID: | 20161113222804.o2uw7c2fish67iej@alap3.anarazel.de |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 2016-11-13 17:20:05 -0500, Tom Lane wrote:
> Andres Freund <andres(at)anarazel(dot)de> writes:
> > I don't quite know what the hook in $subject was originally designed
> > for, but right now it has the problem that it's not invoked for EXPLAIN
> > EXECUTE. That's because ExplainExecuteQuery directly calls
> > ExplainOnePlan instead of ExplainOneQuery_hook.
>
> > Unfortunately that's not entirely trivial to fix, because the hook
> > accepts a Query, not a PlannedStmt.
>
> AFAIR, the purpose of that hook was to let index advisor plugins have
> control of the planning step in an EXPLAIN, so that they could do things
> like injecting hypothetical indexes. There isn't any easy way to do
> something similar in EXPLAIN EXECUTE because the plan comes out of the
> plancache.
> Why do you care? It's a pretty specialized hook.
Citus currently uses it to output additional information for distributed
queries. I suspect we'll instead, for now, have to intercept EXPLAIN as
a whole then :( (moving to custom plans unfortunately is still a bit off
unfortunately).
Andres
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2016-11-13 22:31:55 | Re: ExplainOneQuery_hook ignored for EXPLAIN EXECUTE |
| Previous Message | Tom Lane | 2016-11-13 22:20:05 | Re: ExplainOneQuery_hook ignored for EXPLAIN EXECUTE |