model-writtenrun 861 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Alexander Lakhin reported that a deferred unique-constraint violation at pipeline commit caused psql to fail an available_results assertion #1.
- Michael Paquier reproduced further counter assertions and initially considered tracking commands across Sync boundaries with a queue #2, then chose guarded counter decrements and draining outstanding Sync results as a simpler solution, accompanied by regression tests #3.
- Alexander's testing exposed an infinite draining loop after backend termination #4; Michael added a connection-state check and expanded tests for mixed errors, empty Sync segments, and incremental result retrieval #5.
- Alexander then used server-side error injection to expose another Sync-counter assertion and intermittent hangs #6; Michael added further counter guards and connection-loss handling, while leaving artificial protocol-desynchronization hangs unresolved because they would require libpq changes and an attempted psql workaround destabilized tests #7.
- Alexander agreed with that scope and endorsed the final patch #8; Michael committed it as d21604e17e with comment reflow and expanded explanatory text, then confirmed that it had been applied through PostgreSQL 18 #10.