model-writtenrun 9647 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Thibaut MADELAINE reported that unnest() with a constant-false predicate failed in PostgreSQL 11.2 despite working in 10.7, and Tom Lane identified a missing ProjectSet node when the planner recognized an empty query #1 #2.
- Julien Rouhaud supplied a fix that applied SRF adjustment to dummy relations, then added a regression test; after Tom objected to duplicated processing and the early return, Julien posted a delta moving SRF adjustment into shared processing #3 #4 #5 #6.
- Tom found that projection nodes also concealed empty relations from higher planning stages, demonstrated a related PostgreSQL 10 planning regression, and identified wasted processing of existing partitioned-relation paths #7 #8; he rejected avoiding ProjectSet insertion because replacing SRF expressions would complicate setrefs handling and be risky to backpatch #9.
- Julien supported adding an explicit dummy-relation flag, but Tom rejected that design because childless Append paths automatically establish emptiness and a separate flag could silently break existing callers or extensions; he chose a function that traverses projection paths instead #10 #11.
- Tom posted the broader replacement, including projection-aware dummy detection, revised partitioned-path generation, additional regression tests, and removal of obsolete interfaces, while reserving interface cleanups for the development branch #12.
- Julien briefly proposed a hybrid flag-and-path test, then reviewed Tom's implementation and requested consistent use of IS_PARTITIONED_REL; Tom accepted that change and removed the now-unnecessary partition-field resets, with Julien checking the remaining grouping-path call site #13 #14 #15 #16.
- After inspecting regression-test path costs, Tom retained regeneration of partitioned paths and expanded its explanation; he also changed dummy detection to inspect the first path instead of relying on potentially stale cheapest_total_path state #17.
- Tom committed the revised version of #12 as 1d33858406, crediting himself and Julien and backpatching the applicable fixes to PostgreSQL 11 and 10; the thread ended with Julien's thanks and no outstanding patch work #18.