model-writtenrun 2185 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Dorjpalam Batbaatar reported intermittent SSL bad-length failures during libpq pipeline transfers and supplied an inline workaround that retried writes when no data was sent #1.
- Tom Lane requested a self-contained reproducer #2, Jacob Champion offered help developing one #3, and BATBAATAR Dorjpalam subsequently supplied a sample program demonstrating the failure against PostgreSQL 17 over SSL #4.
- Tom Lane reproduced the failure with a larger workload and traced it to pqFlush offering the full buffer followed by pqPutMsgEnd rounding a retry down to an 8K multiple, violating OpenSSL's retry requirements; removing the rounding prevented the failure in his tests #6.
- Tom Lane established that GSSAPI imposed the same retry-size requirement and chose to retain an earlier GSSAPI fix while updating its now-misleading comments #7.
- Tom Lane submitted the sole attached patchset, preserving 8K rounding only for Unix sockets and disabling it for every TCP connection, including unencrypted connections #8.
- The supplied thread ends with that proposal and no subsequent patch review; f09fea386c then landed #8 unchanged apart from base context, with backpatches through PostgreSQL 13.