forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitcf807eb
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 parent3ffcd24 commitcf807eb
1 file changed
+7
-2
lines changedLines changed: 7 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1647 | 1647 |
| |
1648 | 1648 |
| |
1649 | 1649 |
| |
1650 |
| - | |
1651 |
| - | |
| 1650 | + | |
| 1651 | + | |
| 1652 | + | |
| 1653 | + | |
| 1654 | + | |
| 1655 | + | |
| 1656 | + | |
1652 | 1657 |
| |
1653 | 1658 |
| |
1654 | 1659 |
| |
|
0 commit comments
Comments
(0)