forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit8f55b9a
committed
Avoid memory leakage when a series of subtransactions invoke AFTER triggers
that are fired at end-of-statement (as is the normal case for foreign keys,for example). In this situation the per-subxact deferred trigger contextis always empty when subtransaction exit is reached; so we could free it,but were not doing so, leading to an intratransaction leak of 8K or moreper subtransaction. Per off-list example from Viatcheslav Kalininsubsequent to bug #3418 (his original bug report omitted a foreign keyconstraint needed to cause this leak).Back-patch to 8.2; prior versions were not using per-subxact contextsfor deferred triggers, so did not have this leak.1 parentbeba737 commit8f55b9a
1 file changed
+19
-1
lines changedLines changed: 19 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| |||
2814 | 2814 |
| |
2815 | 2815 |
| |
2816 | 2816 |
| |
| 2817 | + | |
| 2818 | + | |
| 2819 | + | |
| 2820 | + | |
| 2821 | + | |
| 2822 | + | |
| 2823 | + | |
| 2824 | + | |
| 2825 | + | |
| 2826 | + | |
| 2827 | + | |
| 2828 | + | |
| 2829 | + | |
| 2830 | + | |
| 2831 | + | |
| 2832 | + | |
| 2833 | + | |
| 2834 | + | |
2817 | 2835 |
| |
2818 | 2836 |
| |
2819 | 2837 |
| |
|
0 commit comments
Comments
(0)