model-writtenrun 6014 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Elvis Pranskevichus reported a PostgreSQL 14 query returning no rows instead of two with Memoize enabled, while disabling Memoize restored the expected result #1.
- David Rowley suspected that Memoize ignored parameters originating above it but used below it, and Elvis clarified that planner settings were defaults and statistics affected reproduction #2 #3.
- Tom Lane questioned whether the nested-loop inner side could support merge-join mark/restore, but David explained that a merge semi join can skip mark/restore when all join restrictions are merge clauses #4 #5.
- David reproduced the stale-cache bug after adjusting ANALYZE and initially proposed including every relevant outer parameter in the Memoize cache key #6.
- David then attached a cache-flushing implementation because expanding the key appeared to require new Path traversal machinery with backpatch and Custom Scan concerns; he acknowledged that flushing could make the planner overestimate cache effectiveness #7.
- David committed the attached approach with a comment correction and regression coverage as 1050048a31, announcing the successful push in #9.
- The subsequent take-2 landing, 411137a429, reapplied the implementation with missing node copy/read/write support and changed the regression test from tenk2 to tenk1; its repeated implementation hunks indicate an intervening rollback, whose reason is not documented in the supplied discussion.
- Elvis closed the thread by thanking David after both landings, with no further patch revision or resolution of the planner-costing concern recorded #10.