- Notifications
You must be signed in to change notification settings - Fork5
Commit854ae8c
committed
Fix permanent memory leak in autovacuum launcher
get_database_list was uselessly allocating its output data, along somecreated along the way, in a permanent memory context. This didn'tmatter when autovacuum was a single, short-lived process, but now thatthe launcher is permanent, it shows up as a permanent leak.To fix, make get_database list allocate its output data in the caller'scontext, which is in charge of freeing it when appropriate; and thememory leaked by heap_beginscan et al is allocated in a throwawaytransaction context.1 parent947d0c8 commit854ae8c
1 file changed
+17
-3
lines changedLines changed: 17 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1754 | 1754 |
| |
1755 | 1755 |
| |
1756 | 1756 |
| |
| 1757 | + | |
| 1758 | + | |
| 1759 | + | |
1757 | 1760 |
| |
1758 | 1761 |
| |
1759 | 1762 |
| |
| |||
1766 | 1769 |
| |
1767 | 1770 |
| |
1768 | 1771 |
| |
| 1772 | + | |
| 1773 | + | |
| 1774 | + | |
| 1775 | + | |
1769 | 1776 |
| |
1770 | 1777 |
| |
1771 | 1778 |
| |
| |||
1777 | 1784 |
| |
1778 | 1785 |
| |
1779 | 1786 |
| |
1780 |
| - | |
1781 |
| - | |
1782 |
| - | |
1783 | 1787 |
| |
1784 | 1788 |
| |
1785 | 1789 |
| |
1786 | 1790 |
| |
1787 | 1791 |
| |
1788 | 1792 |
| |
1789 | 1793 |
| |
| 1794 | + | |
| 1795 | + | |
| 1796 | + | |
| 1797 | + | |
| 1798 | + | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
| 1802 | + | |
1790 | 1803 |
| |
1791 | 1804 |
| |
1792 | 1805 |
| |
| |||
1797 | 1810 |
| |
1798 | 1811 |
| |
1799 | 1812 |
| |
| 1813 | + | |
1800 | 1814 |
| |
1801 | 1815 |
| |
1802 | 1816 |
| |
|
0 commit comments
Comments
(0)