model-writtenrun 8509 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Seongjun Shin proposed SysloggerWrite and StderrWrite to expose logging stalls that otherwise appeared as NULL wait events, using allocation-free instrumentation around individual writes and a separate Windows console patch; an immediate revision fixed a missing header include #1 #2.
- Kirk Wolak supported making these waits visible, Michael Paquier accepted sharing an event among calls within the same logging routine, and Kyotaro Horiguchi requested coverage of syslog and Windows event-log writes; Seongjun added those paths while retaining the platform split #3 #4 #5 #6.
- Andrey Borodin described production stalls caused by logs on slow storage, explained why the backend pipe write is the observable point, and warned that logging could overwrite an enclosing wait event; Seongjun initially preferred documenting the existing single-slot behavior over adding restoration #8 #9.
- Henson Choi verified the helper safety, instrumentation placement, and event descriptions, while treating broader nesting support as separate work; Seongjun consequently added explanatory comments without changing runtime behavior #10 #11.
- Nikolay Samokhvalov reported runtime coverage on Linux, macOS, and Windows, including EventlogWrite but excluding the real-console WriteConsoleW branch, and suggested covering potentially blocking openlog(); Seongjun added that call under SyslogWrite #12 #13.
- Jihyun Bahn supplied controlled before/after tests for both syslog paths, openlog connection setup, and a stopped syslogger, confirming that the new events exposed previously unattributed waits; the review also explained inherited syslog connections and requested more accurate event wording #14.
- Jakub Wartak independently tested SyslogWrite and described a production outage involving blocked remote logging, but challenged the patch split and warned that an enclosing wait could remain lost after logging returned, particularly in extensions #15.
- After the summer testing, Seongjun retained the platform split to distinguish review coverage, incorporated the connection-setup wording, and expanded the motivation; he still deferred general restoration while acknowledging that source inspection could not prove nesting harmless #16.
- Following off-list feedback from Andrey Borodin and Kirk Wolak, Seongjun replaced the source-scan justification with a runtime nesting check that found quickdie() logging during ClientRead; the code stayed unchanged because that observed process exited immediately afterward, and a general checking mechanism was reserved for separate work #17.
- Nikolay then demonstrated an extension whose published wait disappeared after ereport(LOG) returned, prompting Seongjun to add nested start/end helpers that saved and restored the previous event at every instrumented logging site #18 #19.
- Seongjun subsequently verified restoration on Windows for eventlog and both stderr configurations, while explicitly leaving WriteConsoleW without runtime coverage because the runner redirected stderr #20.
- After the review resumed in November, Henson accepted the helper implementation and suggested an optional block-macro alternative, while Nikolay confirmed restoration across multiple logging destinations; Seongjun kept the localized function approach and marked the entry Ready for Committer #22 #23 #24.
- Michael Paquier requested a single swap API, a separate prerequisite patch, and much shorter explanations; Seongjun responded with a three-patch series containing pgstat_report_wait_swap(), portable logging instrumentation, and Windows-specific instrumentation #25 #26.
- Michael then questioned whether localized swapping was an appropriate workaround and whether every proposed event had sufficient justification, particularly on Windows; Andrey supported incremental restoration, while Seongjun offered to defer Windows coverage and collect more nesting measurements #27 #28 #29.
- Kirk supported improving wait accuracy, but Andres Freund opposed nested-wait semantics and argued that code should not keep a wait published while executing other work; Henson presented hook and interrupt examples in favor of a defined restoration contract, and Andres maintained that the enclosing instrumentation should instead be fixed #30 #31 #32 #33.
- In the final submission, Seongjun reported that expanded tests found logging inside existing waits only on error or exit paths, removed both swapping and Windows-specific instrumentation, and returned to plain start/end calls for portable logging writes; he explicitly acknowledged that extensions which log and continue waiting would again lose their outer event, leaving the narrowed patch proposed with no linked commit #34.