forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitd14241c
committed
Fix memory leak in ARRAY(SELECT ...) subqueries.
Repeated execution of an uncorrelated ARRAY_SUBLINK sub-select (whichI think can only happen if the sub-select is embedded in a larger,correlated subquery) would leak memory for the duration of the query,due to not reclaiming the array generated in the previous execution.Per bug #6698 from Armando Miraglia. Diagnosis and fix idea by Heikki,patch itself by me.This has been like this all along, so back-patch to all supported versions.1 parent68d0e3c commitd14241c
2 files changed
+14
-5
lines changedLines changed: 13 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
668 | 668 |
| |
669 | 669 |
| |
670 | 670 |
| |
| 671 | + | |
671 | 672 |
| |
672 | 673 |
| |
673 | 674 |
| |
| |||
994 | 995 |
| |
995 | 996 |
| |
996 | 997 |
| |
997 |
| - | |
998 |
| - | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
999 | 1005 |
| |
1000 |
| - | |
1001 |
| - | |
| 1006 | + | |
| 1007 | + | |
1002 | 1008 |
| |
1003 | 1009 |
| |
1004 | 1010 |
| |
1005 |
| - | |
| 1011 | + | |
1006 | 1012 |
| |
| 1013 | + | |
| 1014 | + | |
1007 | 1015 |
| |
1008 | 1016 |
| |
1009 | 1017 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
708 | 708 |
| |
709 | 709 |
| |
710 | 710 |
| |
| 711 | + | |
711 | 712 |
| |
712 | 713 |
| |
713 | 714 |
| |
|
0 commit comments
Comments
(0)