diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2024-02-23 15:21:53 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2024-02-23 15:21:53 -0500 |
commit | 37bbe3d3acd62bad24493356a98579bd92c8f563 (patch) | |
tree | 38adc270b07260568cfbcca315ff7de351872b41 /src/backend/executor/nodeGroup.c | |
parent | 90ad85db6a4e06c517c72de84e725c0222e0c529 (diff) | |
download | postgresql-37bbe3d3acd62bad24493356a98579bd92c8f563.tar.gz postgresql-37bbe3d3acd62bad24493356a98579bd92c8f563.zip |
Avoid dangling-pointer problem with partitionwise joins under GEQO.
build_child_join_sjinfo creates a derived SpecialJoinInfo in
the short-lived GEQO context, but afterwards the semi_rhs_exprs
from that may be used in a UniquePath for a child base relation.
This breaks the expectation that all base-relation-level structures
are in the planning-lifespan context, leading to use of a dangling
pointer with probable ensuing crash later on in create_unique_plan.
To fix, copy the expression trees when making a UniquePath.
Per bug #18360 from Alexander Lakhin. This has been broken since
partitionwise joins were added, so back-patch to all supported
branches.
Discussion: https://postgr.es/m/18360-a23caf3157f34e62@postgresql.org
Diffstat (limited to 'src/backend/executor/nodeGroup.c')
0 files changed, 0 insertions, 0 deletions