model-writtenrun 5243 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Christoph Berg reported that stopping a systemd-managed pg_receivewal with SIGTERM left compressed partial WAL output unflushed, and proposed using the existing clean-exit handler for SIGTERM in #1.
- Daniel Gustafsson supported the change, proposed extending it to pg_recvlogical and renaming the handler, and supplied an incidental inline pg_waldump documentation correction in #2; that correction landed separately as 6cbed0ec79 and was backpatched to PostgreSQL 15.
- Christoph added pg_recvlogical support and chose sigexit_handler to distinguish it from the existing SIGHUP handler in #3; Bharath Rupireddy proposed sharing handlers in streamutil.c in #4, but Daniel and Christoph favored keeping the trivial handlers local because they set different variables in #5 and #6.
- Bharath requested matching pg_recvlogical signal documentation in #8, which Christoph added in #9; Bharath subsequently requested more explanation of successful SIGTERM exits in #10, but no additional daemon-specific rationale reached the final documentation.
- Michael Paquier accepted the documentation and local handlers but identified that pg_receivewal's signal flag should use sig_atomic_t in #13, and Christoph incorporated that safety change in #14.
- Daniel supplied the final attached version in #16, preserving Christoph's code while adding pg_recvlogical exit-status documentation and reflowing comments; Christoph approved it in #21.
- Backpatching remained contentious: Michael favored it in #15 and explained the operational benefits in #17, while Daniel questioned changing established behavior in #16 and Magnus Hagander treated it as a feature change in #19; Michael accepted the more conservative policy in #20.
- Daniel committed the final attached version #16 unchanged apart from rebasing as 8b60db7743, and announced completion in #24; the SIGTERM change landed on the development branch without backports, with no attached work remaining.