Re: making EXPLAIN extensible - Mailing list pgsql-hackers

From Andrei Lepikhov
Subject Re: making EXPLAIN extensible
Date
Msg-id d789555b-de6a-4a55-95e2-3684a381e00d@gmail.com
Whole thread Raw
In response to Re: making EXPLAIN extensible  (Sami Imseih <samimseih@gmail.com>)
List pgsql-hackers
On 3/12/25 20:58, Sami Imseih wrote:
>> I think this is a seriously bad idea.  The first line is already
>> overloaded; we don't need several different extensions adding more
>> stuff to it.
> 
> Fair enough.
> 
>> Plus, this doesn't consider what to do in non-text
>> output formats.
> 
> the hook will be a no-op for non-text formats, which is not
> desirable behavior. I get that also.
> 
> I have no strong feelings for this, but wanted to see what
> others think.
I'm against it. For me, the best model there is to allow extensions to 
add something and nothing more. If it wants to change the core explain 
code - use ExplainOneQuery_hook instead.
The reason here is to reduce possible competition among extensions.

I already have troubles with conflict on queryid modifications and 
potential conflict in the planner_hook - if someone invents another 
extension that will provide a plan tree. So, it would be better to 
reduce conflicts whenever possible.

-- 
regards, Andrei Lepikhov



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: lwlocknames.h beautification attempt
Next
From: Robert Haas
Date:
Subject: Re: PATCH: warn about, and deprecate, clear text passwords