forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitcbeb455
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 parentebf52e9 commitcbeb455
1 file changed
+7
-2
lines changedLines changed: 7 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1696 | 1696 |
| |
1697 | 1697 |
| |
1698 | 1698 |
| |
1699 |
| - | |
1700 |
| - | |
| 1699 | + | |
| 1700 | + | |
| 1701 | + | |
| 1702 | + | |
| 1703 | + | |
| 1704 | + | |
| 1705 | + | |
1701 | 1706 |
| |
1702 | 1707 |
| |
1703 | 1708 |
| |
|
0 commit comments
Comments
(0)