Add planner_setup_hook and planner_shutdown_hook.
authorRobert Haas <rhaas@postgresql.org>
Wed, 8 Oct 2025 13:05:38 +0000 (09:05 -0400)
committerRobert Haas <rhaas@postgresql.org>
Wed, 8 Oct 2025 13:05:38 +0000 (09:05 -0400)
commit94f3ad3961a2cb32d30c79f01a70db4caff13318
tree95dd9e9c64c9f1fbaf8a4e650a97becbfa3c5c3a
parentc83ac02ec7309edb7561eee93895c31a54b93d3d
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
src/backend/optimizer/plan/planner.c
src/include/optimizer/planner.h