diff options
author | Peter Eisentraut | 2023-12-30 10:11:26 +0000 |
---|---|---|
committer | Peter Eisentraut | 2023-12-30 10:43:57 +0000 |
commit | a740b213d4b4d3360ad0cac696e47e5ec0eb8864 (patch) | |
tree | 3a685f9b8eb1b6b7599ddb7926647f2ade4c5e59 /src/include/utils/guc.h | |
parent | 9d49837d7144e27ad8ea8918acb28f9872cb1585 (diff) |
Add GUC backtrace_on_internal_error
When enabled (default off), this logs a backtrace anytime elog() or an
equivalent ereport() for internal errors is called.
This is not well covered by the existing backtrace_functions, because
there are many equally-worded low-level errors in many functions. And
if you find out where the error is, then you need to manually rewrite
the elog() to ereport() to attach the errbacktrace(), which is
annoying. Having a backtrace automatically on every elog() call could
be very helpful during development for various kinds of common errors
from palloc, syscache, node support, etc.
Discussion: https://www.postgresql.org/message-id/flat/[email protected]
Diffstat (limited to 'src/include/utils/guc.h')
-rw-r--r-- | src/include/utils/guc.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/utils/guc.h b/src/include/utils/guc.h index 49ee046cf0f..631c09c16b2 100644 --- a/src/include/utils/guc.h +++ b/src/include/utils/guc.h @@ -266,6 +266,7 @@ extern PGDLLIMPORT int log_temp_files; extern PGDLLIMPORT double log_statement_sample_rate; extern PGDLLIMPORT double log_xact_sample_rate; extern PGDLLIMPORT char *backtrace_functions; +extern PGDLLIMPORT bool backtrace_on_internal_error; extern PGDLLIMPORT int temp_file_limit; |