forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitea3989f
committed
Don't run RelationInitTableAccessMethod in a long-lived context.
Some code paths in this function perform syscache lookups, whichcan lead to table accesses and possibly leakage of cruft intothe caller's context. If said context is CacheMemoryContext,we eventually will have visible bloat. But fixing this is noharder than moving one memory context switch step. (The othercallers don't have a problem.)Andres Freund and I independently found this via valgrind testing.Back-patch to v12 where this code was added.Discussion:https://postgr.es/m/20210317023101.anvejcfotwka6gaa@alap3.anarazel.deDiscussion:https://postgr.es/m/3816764.1616104288@sss.pgh.pa.us1 parent5368369 commitea3989f
1 file changed
+7
-5
lines changedLines changed: 7 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3529 | 3529 |
| |
3530 | 3530 |
| |
3531 | 3531 |
| |
| 3532 | + | |
| 3533 | + | |
| 3534 | + | |
| 3535 | + | |
| 3536 | + | |
| 3537 | + | |
| 3538 | + | |
3532 | 3539 |
| |
3533 | 3540 |
| |
3534 | 3541 |
| |
| |||
3552 | 3559 |
| |
3553 | 3560 |
| |
3554 | 3561 |
| |
3555 |
| - | |
3556 |
| - | |
3557 |
| - | |
3558 |
| - | |
3559 |
| - | |
3560 | 3562 |
| |
3561 | 3563 |
| |
3562 | 3564 |
| |
|
0 commit comments
Comments
(0)