Re: ExplainOneQuery_hook ignored for EXPLAIN EXECUTE - Mailing list pgsql-hackers

From Tom Lane
Subject Re: ExplainOneQuery_hook ignored for EXPLAIN EXECUTE
Date
Msg-id 1923.1479075605@sss.pgh.pa.us
Whole thread Raw
In response to ExplainOneQuery_hook ignored for EXPLAIN EXECUTE  (Andres Freund <andres@anarazel.de>)
Responses Re: ExplainOneQuery_hook ignored for EXPLAIN EXECUTE  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
Andres Freund <andres@anarazel.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.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Steve Singer
Date:
Subject: Re: Logical Replication WIP
Next
From: Andres Freund
Date:
Subject: Re: ExplainOneQuery_hook ignored for EXPLAIN EXECUTE