From 71a8a4f6e36547bb060dbcc961ea9b57420f7190 Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Fri, 8 Nov 2019 15:44:20 -0300 Subject: Add backtrace support for error reporting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add some support for automatically showing backtraces in certain error situations in the server. Backtraces are shown on assertion failure; also, a new setting backtrace_functions can be set to a list of C function names, and all ereport()s and elog()s from the mentioned functions will have backtraces generated. Finally, the function errbacktrace() can be manually added to an ereport() call to generate a backtrace for that call. Authors: Peter Eisentraut, Álvaro Herrera Discussion: https://postgr.es/m//5f48cb47-bf1e-05b6-7aae-3bf2cd01586d@2ndquadrant.com Discussion: https://postgr.es/m/CAMsr+YGL+yfWE=JvbUbnpWtrRZNey7hJ07+zT4bYJdVp4Szdrg@mail.gmail.com --- doc/src/sgml/config.sgml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'doc/src') diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index 46bc31de4c4..a0e1925a197 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -9489,6 +9489,32 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' + + backtrace_functions (string) + + backtrace_functions configuration parameter + + + + + This parameter contains a comma-separated list of C function names. + If an error is raised and the name of the internal C function where + the error happens matches a value in the list, then a backtrace is + written to the server log together with the error message. This can + be used to debug specific areas of the source code. + + + + Backtrace support is not available on all platforms, and the quality + of the backtraces depends on compilation options. + + + + This parameter can only be set by superusers. + + + + ignore_system_indexes (boolean) -- cgit v1.2.3