Re: PATCH: backtraces for error messages - Mailing list pgsql-hackers

From Alexander Kuzmenkov
Subject Re: PATCH: backtraces for error messages
Date
Msg-id 8d9f9ebf-adf7-1743-f200-28166267f06d@postgrespro.ru
Whole thread Raw
In response to PATCH: backtraces for error messages  (Craig Ringer <craig@2ndquadrant.com>)
List pgsql-hackers
On 06/20/2018 06:10 PM, Craig Ringer wrote:
>
> I recently needed a way to get backtraces from errors in a convenient, 
> non-interactive and indescriminate way. The attached patch is the 
> result. It teaches Pg to use libunwind to self-backtrace in elog/ereport.
>
> Anyone think this is useful/interesting/worth pursuing?
>

This would be a great thing to have. I often need to add stack traces to 
the logs, and for now I just link with libunwind and add some ad-hoc 
function to grab the traces. Having libunwind support in core would make 
this simpler.


-- 
Alexander Kuzmenkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: partition -> partitioned
Next
From: Andres Freund
Date:
Subject: Re: found xmin from before relfrozenxid on pg_catalog.pg_authid