-
Type: New Feature
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Execution
For cases where we have a large number of relatively idle, "heavy" (memory intensive) cursors, we'd like to be able to reclaim some of the memory held by the query execution operators inside the cursor. Rather than focusing our efforts on developing the right policy for spilling, we'd like to introduce a new mechanism for some tuning process to manually ask cursors to reclaim memory by spilling some of their query execution state to disk. After brief discussion yesterday on the topic, this work is likely broken up into two pieces:
- Introduce new API for PlanExecutor so that we can make a request to reclaim memory
- Introduce a new server command which allows requesting that some executors reclaim memory (likely by accepting cursor ids as a parameter)
When implementing this, we should also consider any new metrics we might add to validate our implementation in production.