forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit9cf37a5
committed
Plug leak in BuildTupleHashTable by creating ExprContext in correct context.
Inbf6c614 I added a expr context to evaluate the groupingexpression. Unfortunately the code I added initialized them while inthe calling context, rather the table context. Additionally, I usedCreateExprContext() rather than CreateStandaloneExprContext(), whichcreates the econtext in the estate's query context.Fix that by using CreateStandaloneExprContext when in the table'stablecxt. As we rely on the memory being freed by a memory contextreset that means that the econtext's shutdown callbacks aren't beingcalled, but that seems ok as the expressions are tightly controlleddue to ExecBuildGroupingEqual().Bug: #15592Reported-By: Dmitry MarakasovAuthor: Andres FreundDiscussion:https://postgr.es/m/20190114222838.h6r3fuyxjxkykf6t@alap3.anarazel.deBackpatch: 11, where I broke this inbf6c6141 parent5996cfc commit9cf37a5
1 file changed
+9
-3
lines changedLines changed: 9 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
208 | 208 |
| |
209 | 209 |
| |
210 | 210 |
| |
211 |
| - | |
| 211 | + | |
212 | 212 |
| |
213 |
| - | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
214 | 220 |
| |
215 |
| - | |
| 221 | + | |
216 | 222 |
| |
217 | 223 |
| |
218 | 224 |
| |
|
0 commit comments
Comments
(0)