Re: Hooking into ExplainOneQuery() complicated by missing standard_ExplainOneQuery

From: Mats Kindahl <mats(at)timescale(dot)com>
To: Andrei Lepikhov <a(dot)lepikhov(at)postgrespro(dot)ru>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Aleksander Alekseev <aleksander(at)timescale(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Hooking into ExplainOneQuery() complicated by missing standard_ExplainOneQuery
Date: 2024-03-06 07:31:31
Message-ID: CA+14426vOyNuCd_CrOqqQuyNCqjzvr1oTDexcwHBbNEQFxuWzA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Mar 6, 2024 at 3:27 AM Andrei Lepikhov <a(dot)lepikhov(at)postgrespro(dot)ru>
wrote:

> On 6/3/2024 06:25, Michael Paquier wrote:
> >> Just to elaborate: the intention was to allow a section to be added to
> >> every node in the plan containing information from further down and also
> >> allow this information to propagate upwards. We happen to have buffer
> >> information right now, but allowing something similar to be added
> >> dynamically by extending ExplainNode and passing down a callback to
> >> standard_ExplainOneQuery.
> >
> > Or an extra hook at the end of ExplainNode() to be able to append more
> > information at node level? Not sure if others would agree with that,
> > though.
>

That is what I had in mind, yes.

> We already discussed EXPLAIN hooks, at least in [1]. IMO, extensions
> should have a chance to add something to the node explain and the
> summary, if only because they can significantly influence the planner
> and executor's behaviour.
>
> [1]
>
> https://www.postgresql.org/message-id/flat/6cd5caa7-06e1-4460-bf35-00a59da3f677%40garret.ru

This is an excellent example of where such a hook would be useful.
--
Best wishes,
Mats Kindahl, Timescale

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2024-03-06 07:41:06 Re: [PoC] Improve dead tuple storage for lazy vacuum
Previous Message Peter Eisentraut 2024-03-06 07:13:02 Re: UUID v7