model-writtenrun 3442 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Greg Stark proposed accepting a TLS ClientHello directly to save a round trip and support standard TLS proxies; after clarifying that the initial byte identifies TLS, he posted a working server prototype #1 #3 #5.
- Vladimir Sitnikov sought automatic discovery without slowing connections to old servers and pointed out that proxies invalidate server-version detection; Greg favored explicit client configuration while preserving traditional negotiation #4 #7 #8 #9 #12.
- Jacob Champion urged mandatory ALPN for the new handshake to prevent cross-protocol attacks and warned against adding HTTP to the database port; Heikki supported ALPN and discussed how it should coexist with PostgreSQL protocol-version negotiation #6 #10 #11 #13.
- Greg added libpq's sslnegotiation option and documentation, then implemented ALPN as mandatory for direct TLS and optional for traditional negotiation, followed by a non-SSL build correction #14 #15 #16.
- Greg subsequently centralized the temporary ALPN identifier, improved its handling, and added SSLRequest pipelining using the same buffered-input machinery; a small configuration-sample correction followed #17 #18.
- Heikki's review proposed moving duplicated buffering into secure_open_server(), identified unsafe static ALPN attribute storage, and questioned configuration switches; Michael Paquier defended switches for compatibility testing, which Heikki initially accepted #19 #20 #21.
- After the long review gap, Heikki took over the series, added reusable Kerberos infrastructure and encryption tests, and reworked libpq's state machine to address confusing option combinations, GSS fallback and pointless TLS retries #22.
- Matthias van de Meent opposed multiplexing HTTP on the database socket and developed exhaustive configuration tests, iterating with Heikki on how to calculate or enumerate expected results while exposing the existing precedence of GSS over sslmode=require #23 #24 #25 #26.
- Jacob's testing and security review identified missing client ALPN validation, server handshakes that completed without an acceptable ALPN selection, and confusing fallback behavior; his concern about more complicated injection defenses led Heikki to drop SSLRequest pipelining #28 #29 #31.
- Heikki consolidated the implementation and documentation, incorporated Matthias's tests, and separated baseline encryption tests from direct-SSL tests so the infrastructure could land independently; he retained the libpq refactoring as a separate patch #30.
- Jacob supplied the missing Meson integration, Heikki rebased across backend startup changes, and Matthias tested the rebased series and supplied a macro simplifying encryption-method selection #32 #34 #35.
- The Kerberos helper from the final full series landed with only minor adjustments as 9f899562d4, providing reusable test infrastructure from #34.
- The baseline encryption tests landed as 1169920ff7, combining Heikki and Matthias's work from #34 with Jacob's Meson correction #32 and a substantial rewrite to explicit expectation tables described in #36.
- Heikki added 20f9b61cc1 without a matching attached patch, moving impossible gssencmode=require failures ahead of connection establishment so subsequent trace tests could expect consistent behavior across builds.
- Heikki then added 705843d294, implementing server negotiation tracing and event-sequence assertions that exposed unnecessary retries in existing libpq behavior, as explained in #36.
- Heikki announced the main series committed, including Matthias's selection macro and requested assertion, and removed the ALPN switches because no tests used them; he reported that the state-machine refactoring also eliminated redundant retries #35 #36.
- Tom Lane reported unchecked chmod and open results flagged by perlcritic after landing, and Heikki confirmed that he fixed them #37 #38.
- Heikki requested ALPN registration, after which Peter Eisentraut questioned both the chosen name and the security rationale; Jacob explained the cross-protocol protection and its distinction from SNI #39 #40 #41 #42.
- At the thread's end the implementation had been announced committed, but ALPN registration remained unapproved; Heikki planned to revise the naming discussion after discovering that the registered service name was postgresql #36 #43.