model-writtenrun 4434 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Sami Imseih reported that repeated extended-protocol fetches caused pg_stat_statements to retain only the last batch's row count, supplied a JDBC reproducer, and proposed EState counters for cumulative rows and calls in #1.
- Michael Paquier questioned enlarging EState and requested regression coverage in #2; Sami explained that psql's bind support could not exercise bounded fetches in #3, while David Zhang confirmed existing tests passed after a clean rebuild in #8.
- After Bertrand Drouvot suggested accumulation inside pg_stat_statements in #7, Sami proposed Instrumentation as the counter storage in #9, Michael supported that placement in #10, and Sami implemented it in #11.
- Bertrand requested argument-type, naming, and comment changes in #12, which Sami incorporated in #13; Bertrand then reported correct JDBC results and approval in #14.
- Yugo Nagata warned that counting each portal fetch as a call would change the meaning of rows-per-call statistics in #17, while Michael and Sami established that automated coverage would require new libpq interfaces separating bind and execute phases in #19 and #20.
- Tom Lane rejected Instrumentation counters because they would consume space per plan node and be maintained only by an extension, recommended one cumulative-row field in EState, and argued against delaying the fix for new testing interfaces in #21.
- Tom argued that calls should continue to count complete query invocations in #23 and #25; Sami accepted a row-count-only fix in #26 and returned to the original EState approach with separate SELECT and non-SELECT handling in #28.
- Michael tested SELECT, INSERT RETURNING, WITH queries, and autocommit behavior, then explained why all operation types could accumulate rows in ExecutorRun() in #29; Sami adopted that simplification and clearer comments in #30.
- Michael approved the simplified patch in #31, and Tom approved it subject to explicit counter initialization in #32, which Sami supplied in #34.
- Michael committed #34 as 1d477a907e with comment and formatting edits confirmed in #36; the commit explains that the EState change prevents back-patching.
- The row-count fix was complete at the thread's end, but automated bounded-fetch coverage remained deferred: after Andres Freund renewed the testing concern in #35, Michael explained the missing libpq interfaces and supplied his JDBC test script for future work in #37.