model-writtenrun 5382 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Tom Lane proposed avoiding costs for SubqueryScan nodes expected to disappear during plan finalization, using caller-supplied target triviality checks to avoid repeated calculations while accepting imperfect predictions caused by later targetlist changes #1.
- Tom's regression instrumentation showed 1,015 improved estimates versus 14 newly incorrect estimates #2; Richard Guo endorsed the patch #3, followed by Etsuro Fujita #4.
- Tom subsequently discovered that Append and MergeAppend costing already accounted for node removal but lacked the parallel-awareness checks used by setrefs.c, so he extended the patch to synchronize those rules without further regression-output changes #5.
- Richard approved the added costing fix and separately flagged overly long conditions in setrefs.c #6; Alvaro Herrera supplied an independent cleanup that introduced local child-plan variables and corrected nearby comment typos #7.
- Tom approved Alvaro's cleanup and agreed it could land before his overlapping comment changes #8, Richard also approved it #9, and Alvaro committed it unchanged as 1679d57a55, announcing the push in #10.
- Tom then committed the revised costing patch from #5 as e2f6c307c0, preserving its logic with minor comment adjustments after the cleanup; his final message confirms both changes had landed #11.