Re: errbacktrace

Pavel Stehule <pavel.stehule@gmail.com>

From: Pavel Stehule <pavel.stehule@gmail.com>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Dmitry Dolgov <9erthalion6@gmail.com>, Thomas Munro <thomas.munro@gmail.com>, Peter Eisentraut <peter.eisentraut@2ndquadrant.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2019-08-12T11:19:41Z
Lists: pgsql-hackers
Hi

so I agree with unconditionally defining that symbol.
>
> Nitpicking dept: I think in these tests:
>
> +   if (!edata->backtrace &&
> +       edata->funcname &&
> +       backtrace_function[0] &&
> +       strcmp(backtrace_function, edata->funcname) == 0)
> +       set_backtrace(edata, 2);
>
>
If I understand well, backtrace is displayed only when edata->funcname is
same like backtrace_function GUC. Isn't it too strong limit?

For example, I want to see backtrace for all PANIC level errors on
production, and I would not to limit the source function?

Regards

Pavel





> we should test for backtrace_function[0] before edata->funcname, since
> it seems more likely to be unset.
>
> --
> Álvaro Herrera                https://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
>
>
>
>
>

Commits

  1. Remove debugging aid