pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrei Lepikhov <lepihov@gmail.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Sami Imseih <samimseih@gmail.com>
Cc: Jeff Davis <pgsql@j-davis.com>
Cc: Thom Brown <thom@linux.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Subject: Re: making EXPLAIN extensible
Date: Thu, 27 Mar 2025 22:34:31 +0100
Message-ID: <41a344e3-ffb1-4296-8ba7-801f1e9642e5@gmail.com> (raw)
In-Reply-To: <CA+TgmoY01MHtibbE=84tHmJLNgcBuvhH19JDd5PF8hrJG8mLbQ@mail.gmail.com>
References: <CA+TgmoYSzg58hPuBmei46o8D3SKX+SZoO4K_aGQGwiRzvRApLg@mail.gmail.com>
	<CAA5RZ0s=NYuB1SnuGmCbeC1=a0adQLmwSw3V-7E33u2R1=9JaA@mail.gmail.com>
	<CA+TgmoZt0-i=d07gHAVZ1Va_0eqCLSRTY+7KXzzWoXua9T1Kkw@mail.gmail.com>
	<CAA5RZ0vOcJF91O2e5AQN+V6guMNLMhJx83dxALf-iUZ-hLGO_Q@mail.gmail.com>
	<2c9376aa-9c66-4662-9803-3d9bc2afead1@gmail.com>
	<8e8b6f17-e1e6-4b16-84d4-37ded802c787@gmail.com>
	<CA+TgmoaTkMna7OMqP-bJ+70sVvhmc2pHZ8xa1dU6NVAWE=7Qrg@mail.gmail.com>
	<CAA5RZ0sKhLRqce2+tvfuzBzm=HWQCe5TdPcbj7Vse+jQE=pyVA@mail.gmail.com>
	<CA+TgmoYcAfrOX8m05vVeh9QXUWO5SUA-uRo67DOK2tmZOnVXqg@mail.gmail.com>
	<CAA5RZ0uYFERQO9XYx9Rc+bVO5WStRSOvK1Bw16qXTNxnCp8xEw@mail.gmail.com>
	<1584338.1742582225@sss.pgh.pa.us>
	<CA+TgmoZfvQUBWQ2P8iO30jywhfEAKyNzMZSR+uc2xr9PZBw6eQ@mail.gmail.com>
	<41ca9655-f905-4eec-96b3-8a3fef350548@gmail.com>
	<CA+Tgmoa5fFZY3S-cY5PHAo=msGgkmP4bZchHZKQDke_h605ZpQ@mail.gmail.com>
	<CA+TgmoY01MHtibbE=84tHmJLNgcBuvhH19JDd5PF8hrJG8mLbQ@mail.gmail.com>

On 3/26/25 19:09, Robert Haas wrote:
> On Sat, Mar 22, 2025 at 12:10 PM Robert Haas <robertmhaas@gmail.com> wrote:
>> I'm not going
>> to insist on shipping this if I'm the ONLY one who would ever get any
>> use out of it, but I doubt that's the case.
> 
> Hearing no other votes against this, I have committed it, but now I
> wonder if that is going to break the buildfarm, because I just noticed
> that the changes I made in v9 seem not to have resolved the problem
> with debug_parallel_query, for reasons I do not yet understand.
> Investigating...
I’m afraid to sound like a bore, but I think pg_overexplain should 
include a call into the hook call chain (see attachment). Who knows, 
maybe this extension will be used someday in production?

-- 
regards, Andrei Lepikhov

Attachments:

v0-0001-Add-into-pg_overexplain-example-on-a-hook-call-ch.patch (text/x-patch, 1.3K) download From 03a88d291cfe085bcff10e0595a679bcfcf14fc8 Mon Sep 17 00:00:00 2001 From: "Andrei V. Lepikhov" <lepihov@gmail.com> Date: Thu, 27 Mar 2025 22:27:33 +0100 Subject: [PATCH v0] Add into pg_overexplain example on a hook call chain agreement. --- contrib/pg_overexplain/pg_overexplain.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/contrib/pg_overexplain/pg_overexplain.c b/contrib/pg_overexplain/pg_overexplain.c index 4554c3abbbf..5f623e06019 100644 --- a/contrib/pg_overexplain/pg_overexplain.c +++ b/contrib/pg_overexplain/pg_overexplain.c @@ -135,6 +135,10 @@ overexplain_per_node_hook(PlanState *planstate, List *ancestors, overexplain_options *options; Plan *plan = planstate->plan; + if (prev_explain_per_node_hook) + (*prev_explain_per_node_hook) (planstate, ancestors, relationship, + plan_name, es); + options = GetExplainExtensionState(es, es_extension_id); if (options == NULL) return; @@ -251,6 +255,10 @@ overexplain_per_plan_hook(PlannedStmt *plannedstmt, { overexplain_options *options; + if (prev_explain_per_plan_hook) + (*prev_explain_per_plan_hook) (plannedstmt, into, es, queryString, + params, queryEnv); + options = GetExplainExtensionState(es, es_extension_id); if (options == NULL) return; -- 2.39.5

view thread (88+ messages)  latest in thread

Message-ID: <41a344e3-ffb1-4296-8ba7-801f1e9642e5@gmail.com>
Permalink:  ../41a344e3-ffb1-4296-8ba7-801f1e9642e5@gmail.com/
Also on:    postgresql.org/message-id/41a344e3-ffb1-4296-8ba7-801f1e9642e5@gmail.com

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: lepihov@gmail.com, robertmhaas@gmail.com, samimseih@gmail.com, pgsql@j-davis.com, thom@linux.com, tgl@sss.pgh.pa.us
  Subject: Re: making EXPLAIN extensible
  In-Reply-To: <41a344e3-ffb1-4296-8ba7-801f1e9642e5@gmail.com>
  References: <CA+TgmoYSzg58hPuBmei46o8D3SKX+SZoO4K_aGQGwiRzvRApLg@mail.gmail.com> <CA+TgmoZt0-i=d07gHAVZ1Va_0eqCLSRTY+7KXzzWoXua9T1Kkw@mail.gmail.com> <CAA5RZ0vOcJF91O2e5AQN+V6guMNLMhJx83dxALf-iUZ-hLGO_Q@mail.gmail.com> <2c9376aa-9c66-4662-9803-3d9bc2afead1@gmail.com> <8e8b6f17-e1e6-4b16-84d4-37ded802c787@gmail.com> <CA+TgmoaTkMna7OMqP-bJ+70sVvhmc2pHZ8xa1dU6NVAWE=7Qrg@mail.gmail.com> <CAA5RZ0sKhLRqce2+tvfuzBzm=HWQCe5TdPcbj7Vse+jQE=pyVA@mail.gmail.com> <CA+TgmoYcAfrOX8m05vVeh9QXUWO5SUA-uRo67DOK2tmZOnVXqg@mail.gmail.com> <CAA5RZ0uYFERQO9XYx9Rc+bVO5WStRSOvK1Bw16qXTNxnCp8xEw@mail.gmail.com> <1584338.1742582225@sss.pgh.pa.us> <CA+TgmoZfvQUBWQ2P8iO30jywhfEAKyNzMZSR+uc2xr9PZBw6eQ@mail.gmail.com> <41ca9655-f905-4eec-96b3-8a3fef350548@gmail.com> <CA+Tgmoa5fFZY3S-cY5PHAo=msGgkmP4bZchHZKQDke_h605ZpQ@mail.gmail.com> <CA+TgmoY01MHtibbE=84tHmJLNgcBuvhH19JDd5PF8hrJG8mLbQ@mail.gmail.com> <41a344e3-ffb1-4296-8ba7-801f1e9642e5@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox