pg_plan_advice: Avoid a crash under GEQO.
Robert Haas <rhaas@postgresql.org>
pg_plan_advice: Avoid a crash under GEQO. The previous code could allocate pgpa_sj_unique_rel objects in a context that had too short a lifespan. Fix by allocating them (and any associated List-related allocations) in the same context as the pgpa_planner_state to which they are attached. We also need to copy uniquerel->relids, because the associated RelOptInfo may also be allocated within a short-lived context. Reported-by: Alexander Lakhin <exclusion@gmail.com> Discussion: http://postgr.es/m/a6e6d603-e847-44dc-acd5-879fb4570062@gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| contrib/pg_plan_advice/pgpa_planner.c | modified | +15 −2 |
Discussion
- pg_plan_advice 219 messages · 2025-10-30 → 2026-06-10