Re: Custom explain options

From: Andrei Lepikhov <a(dot)lepikhov(at)postgrespro(dot)ru>
To: Konstantin Knizhnik <knizhnik(at)garret(dot)ru>, Michael Paquier <michael(at)paquier(dot)xyz>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Custom explain options
Date: 2024-01-10 15:59:02
Message-ID: 7b09d5bd-b44f-42b2-8e3b-5423b33aa8b0@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 10/1/2024 20:27, Konstantin Knizhnik wrote:
>
> On 10/01/2024 8:46 am, Michael Paquier wrote:
>> On Wed, Jan 10, 2024 at 01:29:30PM +0700, Andrei Lepikhov wrote:
>>> What do you think about this really useful feature? Do you wish to
>>> develop
>>> it further?
>> I am biased here.  This seems like a lot of code for something we've
>> been delegating to the explain hook for ages.  Even if I can see the
>> appeal of pushing that more into explain.c to get more data on a
>> per-node basis depending on the custom options given by the caller of
>> an EXPLAIN entry point, I cannot get really excited about the extra
>> maintenance this facility would involve compared to the potential
>> gains, knowing that there's a hook.
>> --
>> Michael
>
>
> Well, I am not sure that proposed patch is flexible enough to handle all
> possible scenarios.
> I just wanted to make it as simple as possible to leave some chances for
> it to me merged.
> But it is easy to answer the question why existed explain hook is not
> enough:
>
> 1. It doesn't allow to add some extra options to EXPLAIN. My intention
> was to be able to do something like this "explain
> (analyze,buffers,prefetch) ...". It is completely not possible with
> explain hook.
I agree. Designing mostly planner-related extensions, I also wanted to
add some information to the explain of nodes. For example,
pg_query_state could add the status of the node at the time of
interruption of execution: started, stopped, or loop closed.
Maybe we should gather some statistics on how developers of extensions
deal with that issue ...

--
regards,
Andrei Lepikhov
Postgres Professional

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2024-01-10 16:13:10 Re: the s_lock_stuck on perform_spin_delay
Previous Message Andrei Lepikhov 2024-01-10 15:49:48 Re: Multidimensional Histograms