On 19.04.24 21:24, Tom Lane wrote:
>> But on the other hand, in my personal experience,
>> backtrace_on_internal_error would be the right thing in a really large
>> number of cases.
> That's why I thought we could get away with doing it automatically.
> Sure, more control would be better. But if we just hard-wire it for
> the moment then we aren't locking in what the eventual design for
> that control will be.
Note that a standard test run produces a number of internal errors. I
haven't checked how likely these are in production, but one might want
to consider that before starting to dump backtraces in routine situations.
For example,
$ PG_TEST_INITDB_EXTRA_OPTS='-c backtrace_on_internal_error=on' meson
test -C build
$ grep -r 'BACKTRACE:' build/testrun | wc -l
85