model-writtenrun 4810 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Richard Guo noticed that the LATERAL test in memoize.sql lost its lateral references when the planner pulled the subquery into the parent query, defeating the intended coverage #1.
- Richard proposed adding ORDER BY 1 inside the subquery to prevent that pull-up #1.
- His patch updated both the explain query and the result-checking query, changing the expected Memoize cache mode from logical to binary #1.
- David Rowley committed the patch with only line wrapping and indentation changes as b762fed648.
- David confirmed that the fix had been applied back through PostgreSQL 14, leaving no outstanding work in the thread #2.