- Notifications
You must be signed in to change notification settings - Fork5
Commiteca75a1
committed
Ensure mark_dummy_rel doesn't create dangling pointers in RelOptInfos.
When we are doing GEQO join planning, the current memory context is ashort-lived context that will be reset at the end of geqo_eval(). However,the RelOptInfos for base relations are set up before that and then re-usedacross many GEQO cycles. Hence, any code that modifies a baserel duringjoin planning has to be careful not to put pointers to the short-livedcontext into the baserel struct. mark_dummy_rel got this wrong, leading toeasy-to-reproduce-once-you-know-how crashes in 8.4, as reported off-list byLeo Carson of SDSC. Some improvements made in 9.0 make it difficult todemonstrate the crash in 9.0 or HEAD; but there's no doubt that there'sstill a risk factor here, so patch all branches that have the function.(Note: 8.3 has a similar function, but it's only applied to joinrels andthus is not a hazard.)1 parent170aeb5 commiteca75a1
1 file changed
+25
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
945 | 946 | | |
946 | 947 | | |
947 | 948 | | |
948 | | - | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
949 | 962 | | |
950 | 963 | | |
951 | 964 | | |
952 | 965 | | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
953 | 975 | | |
954 | 976 | | |
955 | 977 | | |
| |||
961 | 983 | | |
962 | 984 | | |
963 | 985 | | |
| 986 | + | |
| 987 | + | |
964 | 988 | | |
965 | 989 | | |
966 | 990 | | |
| |||
0 commit comments
Comments
(0)