Re: PATCH: backtraces for error messages

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: PATCH: backtraces for error messages
Дата
Msg-id CAMsr+YGBw9tgKRGxyihVeMzmjQx_2t8D17tE7t5-0gMdW7S6UA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: PATCH: backtraces for error messages  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
Ответы Re: PATCH: backtraces for error messages  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
Список pgsql-hackers
On 21 June 2018 at 19:09, Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp> wrote:

I think this for assertion failure is no problem but I'm not sure
for other cases.

I think it's pretty strongly desirable for PANIC.
 
We could set proper context description or other
additional information in error messages before just dumping a
trace for known cases.

Yeah. The trouble there is that there are a _lot_ of places to touch for such things, and inevitably the one you really want to see will be something that didn't get suitably annotated.
 
Since PG9.5 RPMs are complied with --enable-dtrace so we could
use system tap to insert the stack-trace stuff. Additional
built-in probe in error reporting system or assertions would make
this pluggable.

I don't bother with SystemTAP anymore; perf does the job for most purposes.

You can use --enable-dtrace SDTs with Perf fine. I wrote it up for Pg at https://wiki.postgresql.org/wiki/Profiling_with_perf#PostgreSQL_pre-defined_tracepoint_events .

Dynamic tracepoints are also very useful.

Both require debuginfo, but so does outputting of symbolic stacks per my patch.

(That reminds me, I need to chat with Devrim about creating a longer lived debuginfo + old versions rpms repo for Pg its self, if not the accessory bits and pieces. I'm so constantly frustrated by not being able to get needed debuginfo packages to investigate some core or running system problem because they've been purged from the PGDG yum repo as soon as a new version comes out.)

--
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: WIP: BRIN multi-range indexes
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Incorrect errno used with %m for backend code