Re: Support a wildcard in backtrace_functions - Mailing list pgsql-hackers

From Jelte Fennema-Nio
Subject Re: Support a wildcard in backtrace_functions
Date
Msg-id CAGECzQRsgTJ5xq3eFcBiMTzLe_DN9yhAedg1AgKZfZZzMy_rwg@mail.gmail.com
Whole thread Raw
In response to Re: Support a wildcard in backtrace_functions  (Peter Eisentraut <peter@eisentraut.org>)
Responses Re: Support a wildcard in backtrace_functions
Re: Support a wildcard in backtrace_functions
List pgsql-hackers
On Fri, 8 Mar 2024 at 15:51, Peter Eisentraut <peter@eisentraut.org> wrote:
> What is the relationship of these changes with the recently added
> backtrace_on_internal_error?

I think that's a reasonable question. And the follow up ones too.

I think it all depends on how close we consider
backtrace_on_internal_error and backtrace_functions. While they
obviously have similar functionality, I feel like
backtrace_on_internal_error is probably a function that we'd want to
turn on by default in the future. While backtrace_functions seems like
it's mostly useful for developers. (i.e. the current grouping of
backtrace_on_internal_error under DEVELOPER_OPTIONS seems wrong to me)

> shouldn't backtrace_functions_min_level also affect
> backtrace_on_internal_error?

I guess that depends on the default behaviour that we want. Would we
want warnings with ERRCODE_INTERNAL_ERROR to be backtraced by default
or not. There is at least one example of such a warning in the
codebase:

    ereport(WARNING,
            errcode(ERRCODE_INTERNAL_ERROR),
            errmsg_internal("could not parse XML declaration in stored value"),
            errdetail_for_xml_code(res_code));

> Btw., your code/documentation sometimes writes "stack trace".  Let's
> stick to backtrace for consistency.

Fixed that in the latest patset in the email I sent right before this one.



pgsql-hackers by date:

Previous
From: Melanie Plageman
Date:
Subject: Re: Confine vacuum skip logic to lazy_scan_skip
Next
From: Peter Geoghegan
Date:
Subject: Re: Confine vacuum skip logic to lazy_scan_skip