Re: making EXPLAIN extensible
Jeff Davis <pgsql@j-davis.com>
From: Jeff Davis <pgsql@j-davis.com>
To: Robert Haas <robertmhaas@gmail.com>, Thom Brown <thom@linux.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-03-04T18:53:05Z
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
+1 to the general idea, I didn't look at the patches yet. On Fri, 2025-02-28 at 15:32 -0500, Robert Haas wrote: > 1. It is much more verbose. I theorize that people will be unhappy > about having to type EXPLAIN (pg_overexplain.range_table) rather than > just EXPLAIN (range_table). That was my first reaction. > That's true. Of course, a lot depends on whether we end up with 3 or > 5 > or 8 EXPLAIN extensions or more like 30 or 50 or 80. In the former > case, the people writing those extensions will probably mostly know > about each other and can just use different names. I don't expect there to be zillions of extensions that only add new and exciting explain options. Instead, it seems more likely that all TableAM and CustomScan extensions will have 1-3 new explain options, and that some of those might collide. For example, several may have a EXPLAIN(PUSHDOWN) option that explains what work is being pushed down into the TableAM/CustomScan. In that case it's not even clear to me that a collision is a problem. Would you really only want pushdown information from extension A, and be upset that it also emits pushdown information from extension B? Maybe we should just allow multiple extensions to use the same option name? Regards, Jeff Davis