forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit5567d12
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 parent0edef16 commit5567d12
1 file changed
+9
-3
lines changedLines changed: 9 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
212 | 212 |
| |
213 | 213 |
| |
214 | 214 |
| |
215 |
| - | |
| 215 | + | |
216 | 216 |
| |
217 |
| - | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
218 | 224 |
| |
219 |
| - | |
| 225 | + | |
220 | 226 |
| |
221 | 227 |
| |
222 | 228 |
| |
|
0 commit comments
Comments
(0)