model-writtenrun 4547 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- BHUVAN CHILUKUTI reported uncancellable infinite loops in first_value()/nth_value() IGNORE NULLS with EXCLUDE GROUP/TIES and no ORDER BY, proposing a caller-side partition-end check and interrupt handling rather than changing row_is_in_frame() for every caller #1.
- Shihao reproduced the failures, verified the fix against regression tests and about 11,000 frame combinations, and requested a backward-scan last_value() test; Bhuvan added it without changing the production code, and Shihao approved the revision #3 #4 #5.
- Tatsuo questioned testing a hypothetical future change to row_is_in_frame(), and Shihao agreed that his request rested on a misreading; Tatsuo then prepared Bhuvan’s patch without that extra test and with a shorter commit description #9 #10 #11.
- Tatsuo committed #11 unchanged as 69b20fdd20, crediting Bhuvan as author and Shihao and himself as reviewers, and announced the push to master and the PostgreSQL 19 branch #12.
- Fujii Masao then reported that a previously successful ROWS CURRENT ROW query raised division by zero because the fix fetched an unnecessary second input row; Tatsuo explained the new read-ahead and noted that some RESPECT NULLS calls already behaved similarly #13 #14.
- Shihao supplied a follow-up that checks frame membership before spooling, restoring Fujii’s query while retaining termination of the original reproducers, but Tatsuo remained unconvinced of its necessity and deferred discussion until after PostgreSQL 19 GA #15 #16.
- Henson Choi expanded Shihao’s unchanged follow-up into an eight-patch series, documenting the check order, bypassing unnecessary scans for EXCLUDE GROUP/TIES without ORDER BY, and stopping backward IGNORE NULLS scans at the frame start to eliminate quadratic work #17.
- Henson also included Andrey Rachitskiy’s EXCLUDE TIES fix from another thread as a prerequisite for advancing window marks when frame access finds no row, with tests showing reduced tuplestore retention and disk spilling; the imported patch could be dropped if it landed independently #17.
- At the thread’s end, the original infinite-loop fix was committed, while the follow-up series awaited review after PostgreSQL 19 GA; Henson proposed backpatching the regression fixes and left the broader performance changes, possible split, and backpatch scope open for discussion #16 #17.