backtrace_functions emits trace for any elog

From: Ilya Gladyshev <ilya(dot)v(dot)gladyshev(at)gmail(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: backtrace_functions emits trace for any elog
Date: 2023-09-04 20:30:32
Message-ID: 16FA9698-7A7A-4312-BD34-4E2671007B76@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,
I used backtrace_functions to debug one of my ideas and found its behavior counter-intuitive and contradictory to it own docs. I think the GUC is supposed to be used to dump backtrace only on elog(ERROR) (should it also be done for higher levels? not sure about this), but, in fact, it does that for any log-level. I have attached a patch that checks log-level before attaching backtrace.

Regards,
Ilya

Attachment Content-Type Size
0001-check-elevel-before-attaching-backtrace.patch application/octet-stream 768 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2023-09-04 20:43:07 Re: information_schema and not-null constraints
Previous Message Tom Lane 2023-09-04 20:30:31 Re: Create shorthand for including all extra tests