Re: making EXPLAIN extensible
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Andrei Lepikhov <lepihov@gmail.com>
Cc: Jeff Davis <pgsql@j-davis.com>, Thom Brown <thom@linux.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>,
Tom Lane <tgl@sss.pgh.pa.us>
Date: 2025-03-18T13:33:21Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
pg_overexplain: Use PG_MODULE_MAGIC_EXT.
- 83ccc85859f3 18.0 landed
-
pg_overexplain: Call previous hooks as appropriate.
- 9f0c36aea0fb 18.0 landed
-
pg_overexplain: Additional EXPLAIN options for debugging.
- 8d5ceb113e3f 18.0 landed
-
Add an additional hook for EXPLAIN option validation.
- 50ba65e73325 18.0 landed
-
Add some new hooks so extensions can add details to EXPLAIN.
- 4fd02bf7cf94 18.0 landed
-
Make it possible for loadable modules to add EXPLAIN options.
- c65bc2e1d14a 18.0 landed
Attachments
- v7-0001-pg_overexplain-Additional-EXPLAIN-options-for-deb.patch (application/octet-stream) patch v7-0001
On Tue, Mar 18, 2025 at 8:02 AM Andrei Lepikhov <lepihov@gmail.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. > 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'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. -- Robert Haas EDB: http://www.enterprisedb.com