On 3/26/25 19:09, Robert Haas wrote:
On Sat, Mar 22, 2025 at 12:10 PM Robert Haas <robertmh...@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
From 03a88d291cfe085bcff10e0595a679bcfcf14fc8 Mon Sep 17 00:00:00 2001
From: "Andrei V. Lepikhov" <lepi...@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