model-writtenrun 8857 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Peter reported PostgreSQL 12.1 client failures under FreeBSD and Kerberos #1; after Adrian Klaver pointed to a Ruby issue #2, Peter reproduced protocol corruption in psql and showed that disabling GSS encryption avoided it #5.
- Peter narrowed the failure to smaller network packets and slow connections #7, enabling Tom Lane to reproduce it on FreeBSD with a new 100,000-row encrypted-transfer test #8.
- Tom identified missing errno assignments on incomplete reads #9, then discovered that libpq's static GSS buffers also made concurrent connections unsafe #11; Stephen Frost confirmed the shared-state mistake while distinguishing the separate Ruby crash issue #13.
- Tom posted frontend and backend error-handling fixes, aligned their comparable logic, and expanded testing to cover uploads as well as downloads, deliberately leaving buffer ownership for a separate patch #14.
- Tom then recognized that reads made unnecessary socket calls and writes could report success while encrypted data remained unsent #15; his replacement algorithms tracked pending data correctly, accompanied by an explicitly uncommittable EWOULDBLOCK injection patch for testing #16.
- Tom supplied a follow-on patch moving libpq state into each connection and dynamically allocating buffers to avoid alignment hazards, reporting enough successful FreeBSD testing to proceed with committing #17.
- The production changes from #16 and #17 landed together without source changes in 2c0cdc8183, with a PostgreSQL 12 backport; the debugging attachment was omitted as intended.
- After the commit, Peter reported that the initial fix still stalled under bandwidth limiting, whereas the combined final patches worked in his initial tests with and without throttling, although he could not provide heavy-load coverage #18; Tom invited further problem reports #19.
- The thread ended with Stephen Frost and Tom agreeing that partial-write results must count fully transmitted packets while retaining the unfinished packet for retry #20 #21 #22; all intended fixes had landed, with broader testing still welcome.