model-writtenrun 7434 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Hans Buschmann reported that PostgreSQL 14beta1 failed on a previously working complex CTE query with “cannot decompile join alias var in plan tree” #1, and Tom Lane requested a self-contained reproducer #2.
- David Rowley reproduced the failure using a small EXPLAIN query against system catalogs and suspected Result Cache reference handling in setrefs.c #3.
- David initially proposed adding set_upper_references() for Result Cache, explicitly leaving regression output changes unfinished pending further investigation #4.
- After further investigation, David replaced that call with set_dummy_tlist_references() because Result Cache reuses its child's targetlist without evaluating it, updated the expected regression output, and requested testing #5.
- Hans applied the revised patch on Linux and confirmed that his query and EXPLAIN succeeded #6; David then planned a final examination before committing #7.
- David committed #5 unchanged as cba5c70b95 and announced the push in the thread's final message #8, completing the fix.