model-writtenrun 3786 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Ivan Trofimov reported that a server error followed by connection closure could leave libpq busy-looping while waiting for pipeline synchronization, because it prematurely consumed the SYNC queue entry and stopped reading the connection #1.
- Ivan subsequently reported client/server desynchronization observed in production and supplied a reproducer showing that libpq accepted a response missing an expected synchronization acknowledgment #3.
- Alvaro Herrera supplied an initial fix that preserved SYNC entries when processing errors and avoided making an aborted pipeline idle; he reported that it passed the reproducer but wanted further confidence #4.
- Ivan tested the initial patch and confirmed that it fixed both the busy loop and client/server desynchronization #5.
- Alvaro then centralized queue-advancement decisions in pqCommandQueueAdvance and strengthened the barrier to require an actual matching SYNC result, dropping the separate idle-state adjustment; the final message proposed committing this revision to PostgreSQL 14 and later the next day #6.
- The revision landed unchanged on the development branch as b8ba7344e9, with f896818167 carrying the same fix on PostgreSQL 14 with trivial caller adaptations; the supplied candidates therefore describe one completed fix, although the thread itself ends before the commits.