Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit592a228

Browse files
committed
Revert "Add GUC backtrace_on_internal_error"
This reverts commita740b21.Subsequent discussion showed that there was interest in a more generalfacility to configure when server log events would produce backtraces,and this existing limited way couldn't be extended in a compatibleway. So the consensus was to revert this for PostgreSQL 17 andreconsider this topic for PostgreSQL 18.Discussion:https://www.postgresql.org/message-id/flat/CAGECzQTChkvn5Xj772LB3%3Dxo2x_LcaO5O0HQvXqobm1xVp6%2B4w%40mail.gmail.com#764bcdbb73e162787e1ad984935e51e3
1 parent5c9f35f commit592a228

File tree

4 files changed

+3
-44
lines changed

4 files changed

+3
-44
lines changed

‎doc/src/sgml/config.sgml

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -11381,33 +11381,6 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir'
1138111381
</listitem>
1138211382
</varlistentry>
1138311383

11384-
<varlistentry id="guc-backtrace-on-internal-error" xreflabel="backtrace_on_internal_error">
11385-
<term><varname>backtrace_on_internal_error</varname> (<type>boolean</type>)
11386-
<indexterm>
11387-
<primary><varname>backtrace_on_internal_error</varname> configuration parameter</primary>
11388-
</indexterm>
11389-
</term>
11390-
<listitem>
11391-
<para>
11392-
If this parameter is on and an error with error code XX000 (internal
11393-
error; see also <xref linkend="errcodes-appendix"/>) is raised, then a
11394-
backtrace is written to the server log together with the error
11395-
message. This can be used to debug such internal errors (which should
11396-
normally not happen in production). The default is off.
11397-
</para>
11398-
11399-
<para>
11400-
Backtrace support is not available on all platforms, and the quality
11401-
of the backtraces depends on compilation options.
11402-
</para>
11403-
11404-
<para>
11405-
Only superusers and users with the appropriate <literal>SET</literal>
11406-
privilege can change this setting.
11407-
</para>
11408-
</listitem>
11409-
</varlistentry>
11410-
1141111384
<varlistentry id="guc-debug-discard-caches" xreflabel="debug_discard_caches">
1141211385
<term><varname>debug_discard_caches</varname> (<type>integer</type>)
1141311386
<indexterm>

‎src/backend/utils/error/elog.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -497,11 +497,9 @@ errfinish(const char *filename, int lineno, const char *funcname)
497497

498498
/* Collect backtrace, if enabled and we didn't already */
499499
if (!edata->backtrace&&
500-
((edata->funcname&&
501-
backtrace_functions&&
502-
matches_backtrace_functions(edata->funcname))||
503-
(edata->sqlerrcode==ERRCODE_INTERNAL_ERROR&&
504-
backtrace_on_internal_error)))
500+
edata->funcname&&
501+
backtrace_functions&&
502+
matches_backtrace_functions(edata->funcname))
505503
set_backtrace(edata,2);
506504

507505
/*

‎src/backend/utils/misc/guc_tables.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,6 @@ intlog_temp_files = -1;
531531
doublelog_statement_sample_rate=1.0;
532532
doublelog_xact_sample_rate=0;
533533
char*backtrace_functions;
534-
boolbacktrace_on_internal_error= false;
535534

536535
inttemp_file_limit=-1;
537536

@@ -770,16 +769,6 @@ StaticAssertDecl(lengthof(config_type_names) == (PGC_ENUM + 1),
770769

771770
structconfig_boolConfigureNamesBool[]=
772771
{
773-
{
774-
{"backtrace_on_internal_error",PGC_SUSET,DEVELOPER_OPTIONS,
775-
gettext_noop("Log backtrace for any error with error code XX000 (internal error)."),
776-
NULL,
777-
GUC_NOT_IN_SAMPLE
778-
},
779-
&backtrace_on_internal_error,
780-
false,
781-
NULL,NULL,NULL
782-
},
783772
{
784773
{"enable_seqscan",PGC_USERSET,QUERY_TUNING_METHOD,
785774
gettext_noop("Enables the planner's use of sequential-scan plans."),

‎src/include/utils/guc.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,6 @@ extern PGDLLIMPORT int log_temp_files;
267267
externPGDLLIMPORTdoublelog_statement_sample_rate;
268268
externPGDLLIMPORTdoublelog_xact_sample_rate;
269269
externPGDLLIMPORTchar*backtrace_functions;
270-
externPGDLLIMPORTboolbacktrace_on_internal_error;
271270

272271
externPGDLLIMPORTinttemp_file_limit;
273272

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp