model-writtenrun 7363 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Boris Kolpackov opened the thread after ODB bulk inserts stalled without PQpipelineSync(), questioning whether pipeline execution really began immediately and also reporting a busy loop in the example client #1.
- Alvaro Herrera's sleep experiment showed execution could start before synchronization, and Boris's larger batches showed results arriving after roughly 400 inserts, distinguishing immediate execution from buffered results #4 #6.
- Boris also discovered an unexpected initial NULL from PQgetResult() when consuming results before synchronization, followed by another unexpected NULL during aborted-pipeline processing #6 #10.
- Alvaro identified the protocol's existing Flush message as a way to request server output without synchronization and proposed exposing it through libpq; his initial documentation patch still described synchronization as mandatory, and Boris approved it with a typo correction #8 #9 #12.
- Alvaro posted a state-machine fix that prepared result processing when sending commands instead of waiting for PQpipelineSync(); Boris confirmed it fixed the initial NULL but left the aborted-pipeline problem unresolved #14 #15.
- Alvaro combined the documentation, PQrequestFlush(), a reproducing nosync test and the state-machine fix into one series, then asked whether the new function should flush libpq's own buffer #16 #17.
- Michael Paquier supported making the API adjustment during beta, while Boris advocated keeping flush requests separate from client-buffer flushing so applications could schedule them independently #19 #20.
- The documentation and new API landed as PQsendFlushRequest(), with the internal flush removed, in a7192326c7; the unchanged initial-NULL fix and an adjusted nosync test landed separately in b71a9cb31e, both from #16.
- Boris supplied more precise reproduction instructions for the remaining aborted-pipeline failure, which Alvaro reproduced, while Ranier Vilela spotted a false return that should have been written as 0 in the newly committed API #22 #24 #25.
- Alvaro posted a follow-up that centralized state transitions in pqAppendCmdQueueEntry() and handled aborted pipelines separately; Boris initially still saw his failure and supplied a standalone reproducer #29 #30 #32.
- Alvaro found the reproducer could request more results than it had sent queries and explained that PQisBusy() reports whether PQgetResult() would block, not whether a result exists; they retained that behavior and clarified the documentation instead of introducing a new predicate #34 #36 #38.
- Boris adjusted his client, confirmed it worked and proposed the final documentation wording; Alvaro also considered replacing the pipeline-state switch with unconditional queue processing, but abandoned that simplification after testing showed it failed #40 #39 #41.
- The aborted-pipeline fix from #29 landed in ab09679429 with a regression test, Boris's documentation wording and Ranier's return-value correction; the last thread message confirmed the fix was pushed for beta3, with no attached patch remaining pending #41.
- The later follow-up 1a5594b957 came from Jelte Fennema-Nio's patch #546161 in thread #48709, rather than this thread; it cited the historical flushing discussion #17 and added pqPipelineFlush() so flush requests received the same threshold-based transmission treatment as other libpq messages.