From: | Robert Haas <rhaas(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Add some new hooks so extensions can add details to EXPLAIN. |
Date: | 2025-03-18 13:30:24 |
Message-ID: | E1tuX1U-0036GO-1p@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Add some new hooks so extensions can add details to EXPLAIN.
Specifically, add a per-node hook that is called after the per-node
information has been displayed but before we display children, and a
per-query hook that is called after existing query-level information
is printed. This assumes that extension-added information should
always go at the end rather than the beginning or the middle, but
that seems like an acceptable limitation for simplicity. It also
assumes that extensions will only want to add information, not remove
or reformat existing details; those also seem like acceptable
restrictions, at least for now.
If multiple EXPLAIN extensions are used, the order in which any
additional details are printed is likely to depend on the order in
which the modules are loaded. That seems OK, since the user may
have opinions about the order in which output should appear, and the
extension author can't really know whether their stuff is more or
less important to a particular user than some other extension.
Discussion: http://postgr.es/m/CA+TgmoYSzg58hPuBmei46o8D3SKX+SZoO4K_aGQGwiRzvRApLg@mail.gmail.com
Reviewed-by: Srinath Reddy <srinath2133(at)gmail(dot)com>
Reviewed-by: Andrei Lepikhov <lepihov(at)gmail(dot)com>
Reviewed-by: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Reviewed-by: Sami Imseih <samimseih(at)gmail(dot)com>
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/4fd02bf7cf94c3b6807dcf0b13e076de94f1e4ff
Modified Files
--------------
src/backend/commands/explain.c | 13 +++++++++++++
src/include/commands/explain.h | 17 +++++++++++++++++
2 files changed, 30 insertions(+)
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2025-03-18 13:42:38 | Re: pgsql: Avoid invalidating all RelationSyncCache entries on publication |
Previous Message | Álvaro Herrera | 2025-03-18 13:23:06 | pgsql: Simplify reindexdb coding |