pgsql: Add planner_setup_hook and planner_shutdown_hook.

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add planner_setup_hook and planner_shutdown_hook.
Date: 2025-10-08 13:05:53
Message-ID: E1v6Trd-000fvQ-1M@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Add planner_setup_hook and planner_shutdown_hook.

These hooks allow plugins to get control at the earliest point at
which the PlannerGlobal object is fully initialized, and then just
before it gets destroyed. This is useful in combination with the
extendable plan state facilities (see extendplan.h) and perhaps for
other purposes as well.

Reviewed-by: Andrei Lepikhov <lepihov(at)gmail(dot)com>
Reviewed-by: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Discussion: http://postgr.es/m/CA+TgmoYWKHU2hKr62Toyzh-kTDEnMDeLw7gkOOnjL-TnOUq0kQ@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/94f3ad3961a2cb32d30c79f01a70db4caff13318

Modified Files
--------------
src/backend/optimizer/plan/planner.c | 14 ++++++++++++++
src/include/optimizer/planner.h | 13 +++++++++++++
2 files changed, 27 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2025-10-08 13:31:02 pgsql: Add extension_state member to PlannedStmt.
Previous Message Robert Haas 2025-10-08 12:41:26 pgsql: Add ExplainState argument to pg_plan_query() and planner().