- Notifications
You must be signed in to change notification settings - Fork4.9k
Commita6b2a51
committed
Avoid dangling-pointer problem with partitionwise joins under GEQO.
build_child_join_sjinfo creates a derived SpecialJoinInfo inthe short-lived GEQO context, but afterwards the semi_rhs_exprsfrom that may be used in a UniquePath for a child base relation.This breaks the expectation that all base-relation-level structuresare in the planning-lifespan context, leading to use of a danglingpointer 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 sincepartitionwise joins were added, so back-patch to all supportedbranches.Discussion:https://postgr.es/m/18360-a23caf3157f34e62@postgresql.org1 parentd360e3c commita6b2a51
1 file changed
+7
-2
lines changedLines changed: 7 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1707 | 1707 |
| |
1708 | 1708 |
| |
1709 | 1709 |
| |
1710 |
| - | |
1711 |
| - | |
| 1710 | + | |
| 1711 | + | |
| 1712 | + | |
| 1713 | + | |
| 1714 | + | |
| 1715 | + | |
| 1716 | + | |
1712 | 1717 |
| |
1713 | 1718 |
| |
1714 | 1719 |
| |
|
0 commit comments
Comments
(0)