Add planner_setup_hook and planner_shutdown_hook.

Robert Haas <rhaas@postgresql.org>

Commit: 94f3ad3961a2cb32d30c79f01a70db4caff13318
Author: Robert Haas <rhaas@postgresql.org>
Date: 2025-10-08T13:05:38Z
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@gmail.com>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: http://postgr.es/m/CA+TgmoYWKHU2hKr62Toyzh-kTDEnMDeLw7gkOOnjL-TnOUq0kQ@mail.gmail.com

Files

PathChange+/−
src/backend/optimizer/plan/planner.c modified +14 −0
src/include/optimizer/planner.h modified +13 −0

Discussion