model-writtenrun 7373 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Bharath Rupireddy proposed two backend-exit waiting functions in #1 because pg_terminate_backend() only sends SIGTERM, leaving tests vulnerable to a backend remaining alive after the call returns.
- Magnus Hagander proposed extending pg_terminate_backend() with optional waiting, timeouts, and wait-event reporting in #2, while David G. Johnston questioned restricting waiting to superusers and suggested an idle-wait mode in #3 and #7.
- Bharath implemented termination and idle waiting in #9, but Fujii Masao identified idle-state races, late timeout validation, and missing argument defaults in #10; David withdrew the idle-wait proposal and requested warnings explaining false results in #12.
- The revised patch in #15 removed idle waiting, used WaitLatch with integer millisecond timeouts, returned false with a warning on timeout, and added documentation and default arguments.
- Muhammad Usama reported successful functional and regression testing in #16, and Hou Zhijie's subsequent reviews led to portable integer formatting, consistent PID extraction, corrected documentation, and parallel-safe declarations through #27, followed by another successful test report in #28.
- After a three-month gap, Magnus resumed review in #29 and requested a single termination function with default arguments, a clearer standalone-waiter name, and simpler polling; Bharath implemented these changes in #30.
- Following the rebase in #31, Fujii found that a missing ResetLatch could cause busy looping and requested earlier timeout validation in #32; the fixes in #33 also increased the polling interval, and Magnus's follow-up review produced a five-second standalone default in #35.
- Kyotaro Horiguchi identified inaccurate timeout accounting after early latch wakeups, questioned PID reuse and self-termination handling, and challenged the redundant wait flag in #36; Bharath defended checking actual operating-system process exit and left the elapsed-time accounting concern unresolved in #37.
- Fujii warned that indefinite waiting could create undetectable deadlocks in #39, and #41 settled on a timeout-only termination API where zero means no wait, negative values error, and positive values bound the wait.
- After the rebase in #42, Magnus committed both waiting facilities as aaf0432572, rewriting documentation, correcting the function OID, and simplifying temporary variables as explained in #43.
- Noah Misch reopened the standalone function's usefulness in #44: its initial BackendPidGetProc() check rejects a backend that has left the procarray but still exists in the operating-system process table, so it cannot reliably replace regress.c's wait_pid().
- Bharath considered removing the procarray check in #45, but that would allow waiting on arbitrary operating-system processes; Noah instead favored retaining only the termination timeout in #46 and explained in #48 that callers satisfied with procarray departure could poll pg_stat_activity.
- Noah posted the standalone-function removal patch in #50, and Justin Pryzby proposed shorter catalog descriptions and supplied inline documentation and comment corrections in #51 and #53.
- Bharath forwarded an updated removal patch in #54, combining Noah's removal with Justin's copy edits and correcting a commit-message typo.
- Noah split #54 into 0aac73e6a2 for Justin's copy edits and 5f1df62a45 for the standalone-function removal, adding the required catalog-version bump to the latter.
- The final message, #57, confirms both commits were pushed: pg_terminate_backend() retains its optional timeout, the standalone waiter is removed, and no attached patch remains pending.