model-writtenrun 7865 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Mikael Gustavsson reported that psql 13 failed against a PostgreSQL 13 server requiring SSL and PAM authentication, while psql 11 connected successfully to the same server #1.
- Magnus Hagander corrected how sslmode=require should be supplied, but Mikael still reproduced the failure and subsequently showed that relaxing hostssl to host allowed an unencrypted connection even with SSL required #8 #9 #12.
- Mikael discovered that gssencmode=disable restored SSL, directing the investigation toward GSS negotiation; Stephen Frost and Tom Lane agreed that the documentation needed to explain GSS encryption's precedence over SSL #15 #18 #19.
- Tom reproduced the fallback failure: successful GSS negotiation cleared allow_ssl_try, so a later authentication failure caused libpq to reconnect without trying SSL #22.
- Kyotaro Horiguchi supplied a patch to expose GSS encryption in misleading pg_hba.conf errors; Tom revised it to distinguish GSS encryption, SSL encryption, and no encryption across rejection cases, and Kyotaro tested the revised messages successfully #23 #25 #26.
- Tom identified the remaining trigger as the server's prohibition on PAM or password authentication over GSS-encrypted connections, argued for removing that restriction, and posted a libpq fix that preserved SSL eligibility and centralized connection-reset handling #27 #28.
- Tom expanded the work into a four-patch series covering backend communication-error handling, deferred GSS state allocation, connection logging, shared-memory accounting, removal of the authentication restriction, and documentation, while retaining the separate pg_hba.conf diagnostic patch #29.
- The libpq component of #29 landed as ff6ce9a3a6, with additional GSS error-reporting and service-name allocation fixes.
- The remaining three components of #29 were combined into 622ae4621e, with further error-string handling changes and a fixed COMMERROR severity for backend GSS errors.
- The diagnostic revision in #25 landed separately as 3995c42498, adapted to tolerate the newly nullable GSS state pointer.
- Peter Svensson confirmed that the libpq patch restored SSL connections, and Tom reported that the client and server fixes had already been pushed for February's releases #30 #31.
- Tom then posted a separate fix making authentication and encryption consistently override KRB5_KTNAME with a nonempty krb_server_keyfile setting and check environment-setting failures #32.
- Stephen Frost suggested documenting the fallback for an empty keytab setting; Tom incorporated that clarification, improved diagnostics and sample configuration, and committed 860fe27ee1, closing the thread with the proposed fixes landed #33 #34.