model-writtenrun 3170 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Andres Freund proposed evaluating correlated SubPlan arguments within the referencing ExprState to reduce separate expression states, memory consumption, and execution overhead, posting an initial implementation with small measured speedups in #1.
- Tom Lane objected that embedding executor parameter-array addresses in compiled expressions would prevent reuse across executor instances and might fail during EvalPlanQual, proposing an explicit parameter-setting step in #2; Andres adopted that approach with interpreter and LLVM support for EEOP_PARAM_SET in #6.
- Tom judged the revised approach ready for a committer but requested documentation, parameter-type initialization, and assertion improvements in #7; Andres preferred retaining ExprState scratch storage to avoid additional pointers in JIT expressions in #8, which Tom accepted in #9.
- After months without landing, Alena Rybakina reviewed and rebased the patch, reporting passing regression tests in #13, and later refreshed it again without implementation changes in #18.
- Tom revived the patch in July 2024, resolving another rebase conflict and applying his outstanding cleanup requests in #19; he declined additional tests because coverage checks showed the core regression suite already exercised all the affected code.
- Alena reviewed the final submission and agreed it was ready to commit in #20, and Andres undertook to push it in #21.
- Before committing, Andres documented lower executor memory usage, a reduction from 31 to 21 JIT functions in an example query, and roughly 1–3% execution improvements for realistic queries in #22.
- Andres committed #19 unchanged as a7f107df2b and confirmed completion in #23; broader uses of EEOP_PARAM_SET for SubPlan outputs, nestloop parameters, and other expression state were explicitly deferred in the commit message.