model-writtenrun 7607 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
May - Dec 2020 · 15 entries
- David Rowley proposed a standalone Result Cache executor node in #1, using a memory-bounded hash table with LRU eviction to reuse results for parameterized nested loops and correlated subplans.
- Simon Riggs suggested enabling caching dynamically when execution exposed poor estimates in #2, while David distinguished that problem from the proposed cost-based optimization in #3.
- Andy Fan tested correctness and performance on TPC-H in #6; David's analysis in #7 found useful cache hits in two queries, an incidental plan improvement in another, and slight overhead where caching produced no hits.
- David split out estimation-quality flags and direct hash-entry deletion in #11, while a simple subquery benchmark showed that unconditional caching could impose roughly 25% overhead.
- The revisions in #12 and #13 fixed cache completion for unique joins, reduced entry size, improved memory costing, and removed compiler warnings.
- Andres Freund examined simplehash deletion costs and pointer validity in #17; David subsequently preserved the existing delete-by-key function and added a separate direct-deletion function in #26, which also introduced LATERAL support.
- Robert Haas warned that Result Cache could be confused with whole-query caching in #18, and David deferred renaming until a stronger consensus emerged in #20.
- Andres advocated embedding caching in Nested Loop and SubPlan to avoid executor-node overhead in #22 and #35, while Tom Lane and David defended separate-node clarity and modularity in #29 and #36.
- David supplied an experimental nested-loop delta in #43, initially finding tuple-conversion overhead; a revised experiment using separate projection information in #48 produced faster results on the selected tests.
- The standalone branch received planner-path cleanup in #50, then David produced a full embedded-cache alternative in #51, moving shared cache machinery into execMRUTupleCache.c and temporarily dropping subplan support.
- Andy found redundant tuple clearing in the embedded implementation and supplied an inline fix in #55, but David's broader benchmarks still favored the standalone node in #56.
- After concerns about code-alignment noise, David tested both implementations across thirty repository snapshots in #65, finding the standalone version faster in twenty-eight cases.
- David returned to the standalone branch in #70, added peak-memory reporting and cheaper equality expressions, adopted EstimationInfo and hash-memory budgeting, and separated correlated-subplan caching because reliable hit-rate costing remained unavailable.
- Zhihong Yu's review prompted further cleanup and an optional memory-check helper in #74, although David remained unconvinced that the helper's mixed return-value requirements improved the code.
- Konstantin Knizhnik reported a severe Join Order Benchmark slowdown in #76; David identified both EXPLAIN timing overhead and unreliable distinct estimates as concerns in #77.
Jan - Apr 2021 · 10 entries
- After the ensuing gap, Justin Pryzby rebased the series and reviewed flags, assertions, documentation, and wording in #78; David incorporated feedback and reported broader benchmark results with #80.
- David removed the unready correlated-subplan patch in #81 and measured substantial planning overhead; Andy reproduced that overhead and separately attached an IMDb loader fix in #82.
- Andres proposed caching volatility information in #85, Tom rejected storing changeable function properties in persistent expression nodes in #86, and Tom instead recommended planner-local RestrictInfo and PathTarget caches in #88.
- David implemented eager volatility caching in #93, but Tom's code review in #94 led to lazy tri-state caching in #96, followed by caller and correctness cleanup in #97.
- The volatility prerequisite from #97 landed as f58b230ed0 with added comments and formatting, and #98 carried the remaining series with a more stable parallel test.
- The direct-deletion and estimation-information prerequisites from #98 landed with unchanged diffs as ff53d7b159 and ed934d4fa3, respectively.
- Zhihong reviewed EXPLAIN and cache handling in #99, and David posted the remaining main patch in #100 with those changes and revised worker statistics; the optional memory-check helper was omitted.
- Following Zhihong's further review in #101, David removed redundant lateral-variable checks and added cached hash-equality operators before landing #100 as b6002a796d, as explained in #102.
- Buildfarm failures forced that first landing to be reverted; #103 supplied a revised patch that suppressed inactive-leader cache statistics, enlarged the eviction test for 32-bit systems, and avoided architecture-dependent bitmap-scan output.
- Hou identified an incorrect path-node tag and missing optimizer documentation in #104; David incorporated those corrections and disabled caching in unstable partition-pruning tests when landing #103 as 9eacee2e62, confirmed in #105.
May 2021 · 1 entry
- At the thread's end, Andy revisited planning overhead in #106, and David explained in #107 that volatility and hash-operator caches reduced it but could not eliminate the cost of considering another path; LATERAL metadata caching remained unfinished, correlated-subplan caching remained deferred, and enable_resultcache provided an escape hatch.