mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
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
This commit is contained in:
@@ -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>
|
||||
|
Reference in New Issue
Block a user