diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2019-11-08 15:44:20 -0300 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2019-11-08 15:44:20 -0300 |
commit | 71a8a4f6e36547bb060dbcc961ea9b57420f7190 (patch) | |
tree | 3abd0dc46c18cc7400933fb2ef3f19d3e8f3f28a /doc/src | |
parent | 3dcffb381c81c9c8f8254100feacac256b9e75a6 (diff) | |
download | postgresql-71a8a4f6e36547bb060dbcc961ea9b57420f7190.tar.gz postgresql-71a8a4f6e36547bb060dbcc961ea9b57420f7190.zip |
Add backtrace support for error reporting
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
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/config.sgml | 26 |
1 files changed, 26 insertions, 0 deletions
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' </listitem> </varlistentry> + <varlistentry id="guc-backtrace-functions" xreflabel="backtrace_functions"> + <term><varname>backtrace_functions</varname> (<type>string</type>) + <indexterm> + <primary><varname>backtrace_functions</varname> configuration parameter</primary> + </indexterm> + </term> + <listitem> + <para> + 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. + </para> + + <para> + Backtrace support is not available on all platforms, and the quality + of the backtraces depends on compilation options. + </para> + + <para> + This parameter can only be set by superusers. + </para> + </listitem> + </varlistentry> + <varlistentry id="guc-ignore-system-indexes" xreflabel="ignore_system_indexes"> <term><varname>ignore_system_indexes</varname> (<type>boolean</type>) <indexterm> |