model-writtenrun 9232 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Thomas Munro reported two intermittent Kerberos buildfarm failures in #1, considering a server-readiness race but observing that one failure appeared to involve an unexpected query result after connecting.
- While investigating, Tom Lane reproduced a separate port-binding failure and proposed reusing PostgresNode's free-port selection logic in #2; he also questioned server shutdown handling, without establishing an explanation for the original failures.
- Tom confirmed that sockets remaining in TIME_WAIT caused his reproduced failure and posted #3, extracting get_free_port() and using it for both Kerberos and LDAP authentication servers; the patch fixed his repeated-test reproducer.
- Andrew Dunstan reviewed the patch in #4, requesting corrected function-call documentation and an early exit when an address cannot bind, and Tom accepted both suggestions in #5.
- Tom committed the patch with those small changes as 803466b6ff and backpatched it through PostgreSQL 11; the port-selection fix landed, while the original two buildfarm failures remained unexplained.