model-writtenrun 9150 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Peter Eisentraut opened the thread with an extension of Álvaro Herrera’s earlier work, offering explicit errbacktrace() calls and a backtrace_function setting to capture errors from a selected C function, initially supporting both native backtrace APIs and libunwind #1.
- Álvaro demonstrated successful error backtraces #2, while Jaime Casanova found libunwind linking failures #4, Thomas Munro identified missing FreeBSD execinfo linkage #5, and Dmitry Dolgov demonstrated a local-unwinding workaround #6.
- Peter chose to drop libunwind because the native APIs were more widely available without an additional dependency #8, then posted a revision adding documentation, FreeBSD linkage, and automatic assertion-failure backtraces #9; Thomas confirmed it worked on FreeBSD #13.
- Thomas suggested severity-controlled backtraces #13, and Pavel Stehule requested unrestricted PANIC backtraces #14, but Peter deferred additional invocation mechanisms until the basic support was established #15.
- Peter expanded the setting to a comma-separated backtrace_functions list, using custom splitting to avoid complications from errors during error handling #17.
- Álvaro proposed parsing the list when configuration was read #18, and Tom Lane warned that calling strtok() from error reporting could corrupt process-wide parsing state #19; Peter identified the GUC extra mechanism’s single-allocation constraint as an obstacle to ordinary lists #20.
- Álvaro supplied a revised patch that stores all function names in one NUL-separated allocation through GUC check/assign hooks and scans that representation during error reporting, also correcting the inverted elog_finish matching condition #21.
- Peter authorized Álvaro to finish the work #23 and later reviewed his implementation, requesting a comment explaining the unusual list representation #24.
- Álvaro committed the final attachment #21 as 71a8a4f6e3, adding explanatory comments, correcting backtrace buffer lengths and tab handling, and removing a diagnostic print; he announced the landing in #25.
- Tom subsequently found that errbacktrace() still contained an unintended Assert(false), and reported that removing it restored the intended behavior #26; Álvaro acknowledged the mistake in the thread’s final message #27.
- The follow-up 45ff049e28 removed that assertion, leaving the backtrace feature landed with its immediate regression fixed, while additional severity-based triggers remained deferred as stated in #15.