model-writtenrun 3443 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Tristan Partin reported that Ctrl-C could not interrupt psql reconnection during Neon's interactive authentication and proposed temporarily restoring the default SIGINT handler in #1.
- Gurjeet Singh questioned ignored handler-registration failures in #2, but Tom Lane redirected the design in #6: cancellation should preserve psql and its previous connection, using PQconnectPoll() instead of terminating the process; Tristan implemented that approach in #7.
- After a gap, Heikki Linnakangas identified busy polling and cancellation-state concerns in #10, then explained interruptible waits and timeout protection in #12; Tristan added a copied pqSocketPoll() helper, cancel_pressed checks, and corrected loop termination in #13.
- Heikki identified a race between checking cancel_pressed and entering the blocking wait in #14, outlining timeout polling, a self-pipe, and pselect()/ppoll(); Tristan chose signal-aware waits with a timeout fallback in #15, reporting that the self-pipe attempt became unwieldy with psql's existing handler.
- The attachment in #16 only reformatted the previous implementation despite its accompanying description, and Tristan supplied the intended select()/pselect() simplification and extracted connection-processing function in #18.
- Robert Haas objected to duplicated polling code and excessive conditional complexity in #17 and encouraged an API-based solution in #19; Tristan split the work into exposing PQsocketPoll through libpq and calling it from psql in #21, abandoning signal-mask machinery in favor of a one-second timeout.
- Jelte Fennema-Nio requested moving the export into the API patch and adding standalone documentation in #22 and #24; Robert requested clearer comments and a shorter helper name in #25, and Tristan incorporated those changes, rebased, removed an incidental leak-suppression file, and corrected the polling deadline in #26.
- Robert's reviews in #27 and #29 drove documentation of read/write readiness, errno, timeout semantics, socket changes, and error-reporting ownership, incorporated through #28 and #30.
- Robert committed both attachments from #30 with exact matching diffs: the public polling API as f5e4dedfa8 and interruptible psql reconnection as cafe105655, announcing completion in #31.
- Jelte found that loop breaks could reach an allegedly unreachable instruction in the committed psql code and supplied corrective patches in #33, also proposing removal of the long-unused PGRES_POLLING_ACTIVE enum value.
- Tristan initially approved the fixes in #34, but Tom warned that removing the public enum would provoke compatibility objections in #35; Jelte retained the enum and revised its comment while still removing its switch case in #36.
- Tristan reported the resulting switch warning in #37, prompting Jelte's default-case revision in #38, but Tristan rejected losing exhaustive enum diagnostics and endorsed the comment change in #39.
- Robert asked for a single minimal correction to the reachable pg_unreachable() call and agreed with retaining explicit switch coverage in #40; Jelte consequently reduced the series to deleting that call and updating the enum comment in #41.
- Robert committed both final fixes unchanged as 12b964d781 and e57fe3824e, confirming the landing in #42; the enum and its explicit switch case were retained.
- The thread ended with all retained patches committed and Tristan acknowledging the copy-paste mistake in #43, with no remaining patch series awaiting review.