forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit9061fd2
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 parenteb1d008 commit9061fd2
1 file changed
+7
-2
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1622 | 1622 |
| |
1623 | 1623 |
| |
1624 | 1624 |
| |
1625 |
| - | |
1626 |
| - | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
| 1630 | + | |
| 1631 | + | |
1627 | 1632 |
| |
1628 | 1633 |
| |
1629 | 1634 |
| |
|
0 commit comments
Comments
(0)