model-writtenrun 3453 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Jakub Wartak reported that FETCH_COUNT silently failed to limit memory for CTE queries and proposed treating WITH as cursor-eligible in #1.
- Daniel Verite demonstrated that WITH can precede an INSERT that cannot run through a cursor and proposed single-row libpq fetching in #2; Robert Haas and Tom Lane supported that direction, while Robert suggested larger incremental batches to reduce overhead in #3, #4, and #5.
- Jakub offered a warning-only fallback in #6, but that approach was superseded by Daniel's single-row prototype in #7, which retained cursors for SELECT because his measurements showed substantial per-row overhead.
- Daniel added paging and result-count handling in #8, then addressed the incompatible-pointer warnings Tom reported in #9 with the revised printing interfaces in #10.
- Daniel replaced the hybrid implementation with a two-part libpq and psql series in #11: libpq returned bounded chunks, psql discarded its cursor implementation, and benchmarks showed improvements in memory use and execution time.
- The series was refreshed in #12 and rebased again in #14 after an export-table conflict, preserving the chunked-results design.
- Jakub verified that the revised series solved his original problem but observed continued query processing after quitting the pager in #15; Daniel explained in #16 that automatically canceling would also abort the transaction, leaving explicit Ctrl+C as the cancellation mechanism.
- Laurenz Albe reviewed both components in #17 and #18, suggesting clearer documentation, shared single-row and chunked internals, and simpler psql conditions, and reported successful builds and tests.
- Daniel explained the ABI constraint against renumbering result statuses and his reservations about sharing the two implementations in #19, then incorporated Laurenz's documentation and psql simplifications in #20.
- Tom questioned the new libpq mode and the changed documentation URL in #21; Daniel supplied additional performance measurements and a possible processing-overlap explanation in #22 and #24.
- Tom ultimately accepted chunked results because single-row fetching would otherwise require costly result merging or changes to psql's printing interface, and announced his rewritten implementation in #25.
- The libpq half of #20 landed as 4643a2b265, with unified single-row/chunked internals, additional protocol handling and tests, and preservation of the existing documentation URL.
- The psql half of #20 landed as 90f5178211, with revised chunk-loop, output-helper, cancellation, and error-handling logic; Daniel endorsed the landed approach in #26.
- Alexander Lakhin identified a stale reference to the removed cursor function in #27 and clarified the requested cleanup in #29, prompting Tom to inspect the new execution path more closely.
- Tom's follow-up c21d4c416a removed obsolete comments, honored the configured output stream and print options, and restored command-status output for RETURNING queries, as explained in #31.
- At the end of the thread, both feature patches and the follow-up had landed; Tom left open whether FETCH_COUNT should support \watch, particularly its pager behavior and minimum-row check, in #31.