Re: making EXPLAIN extensible

From: Andrei Lepikhov <lepihov(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Jeff Davis <pgsql(at)j-davis(dot)com>, Thom Brown <thom(at)linux(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: making EXPLAIN extensible
Date: 2025-03-18 13:58:12
Message-ID: 27476b3c-5d08-428f-b77a-b9d56f30db69@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 3/18/25 14:33, Robert Haas wrote:
> On Tue, Mar 18, 2025 at 8:02 AM Andrei Lepikhov <lepihov(at)gmail(dot)com> wrote:
>> Some questions:
>> 1. I think, hooks ExplainOneQuery_hook_type, explain_per_plan_hook_type,
>> explain_per_node_hook_type deserve to be moved to explain_format.h
>> At least, inside the hook, we usually use functions like ExplainProperty.
>
> -1, because the hooks will be called from explain.c, not explain_state.c.
Ok.
>
>> 2. In my patch I inserted the hook before the line 1894:
>> /* in text format, the first line ends here */
>> Why have you chosen a different way? I don't have specific reasons to
>> insist, except the extension data right under the node looks better to
>> me personally.
>
> Tom discusses why we shouldn't try to add to the first line in
> http://postgr.es/m/2234935.1741809008@sss.pgh.pa.us and I'm fully in
> agreement.
I agree with him, too. But, as you can see, I proposed not changing the
first string or adding something there but just putting extension data
under that line. Extra information about workers' state (not so
important most of the time, I should say) sometimes makes it difficult
to read.

>
> I've committed 0001 and 0002 for now. The additional hook for
> cross-option validation can be added in a separate commit. v6-0003,
> now v7-0001, needs more substantive review before commit. I hope it
> gets some, and soon.
Ok, I am ready to review it thoroughly, if needed.

--
regards, Andrei Lepikhov

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ranier Vilela 2025-03-18 14:04:00 Re: Simplify the logic a bit (src/bin/scripts/reindexdb.c)
Previous Message Robert Haas 2025-03-18 13:42:38 Re: pgsql: Avoid invalidating all RelationSyncCache entries on publication