Re: RFC: extensible planner state
Melanie Plageman <melanieplageman@gmail.com>
From: Melanie Plageman <melanieplageman@gmail.com>
To: Andrei Lepikhov <lepihov@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-09-12T20:33:57Z
Lists: pgsql-hackers
On Tue, Aug 26, 2025 at 4:58 AM Andrei Lepikhov <lepihov@gmail.com> wrote: > > 1. Why is it necessary to maintain the GetExplainExtensionId and > GetPlannerExtensionId routines? It seems that using a single > extension_id (related to the order of the library inside the > file_scanner) is more transparent and more straightforward if necessary. But this wouldn't work for in-core use cases like GEQO, right? Also, how would it work if there are multiple "extensions" in the same .so file? > 2. Why does the extensibility approach in 0001 differ from that in 0004? > I can imagine it is all about limiting extensions, but anyway, a module > has access to PlannerInfo, PlannerGlobal, etc. So, this machinery looks > a little redundant, doesn't it? What do you mean that the extensibility approach differs? Like that the type of extension_state is different? - Melanie
Commits
-
Add extension_state member to PlannedStmt.
- 4685977cc51c 19 (unreleased) landed
-
Add planner_setup_hook and planner_shutdown_hook.
- 94f3ad3961a2 19 (unreleased) landed
-
Add ExplainState argument to pg_plan_query() and planner().
- c83ac02ec730 19 (unreleased) landed
-
Remove PlannerInfo's join_search_private method.
- 64095d157482 19 (unreleased) landed
-
Allow private state in certain planner data structures.
- 0132dddab33a 19 (unreleased) landed
-
Fix array allocation bugs in SetExplainExtensionState.
- 694057d236b1 18.1 landed
- 803ef0ed49ee 19 (unreleased) landed
-
Make it possible for loadable modules to add EXPLAIN options.
- c65bc2e1d14a 18.0 cited