mirror of https://github.com/citusdata/citus.git
Delete StatsCollection memory context after we are done with stats reporting.
Previously we left the memory context untouched, which overtime leaked memory.pull/1701/head
parent
873fd1e7ff
commit
946659aebe
|
@ -328,6 +328,7 @@ CitusMaintenanceDaemonMain(Datum main_arg)
|
||||||
prevStatsCollectionFailed = !CollectBasicUsageStatistics();
|
prevStatsCollectionFailed = !CollectBasicUsageStatistics();
|
||||||
|
|
||||||
MemoryContextSwitchTo(oldContext);
|
MemoryContextSwitchTo(oldContext);
|
||||||
|
MemoryContextDelete(statsCollectionContext);
|
||||||
prevStatsCollection = currentTime;
|
prevStatsCollection = currentTime;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue