Re: elog a stack trace - Mailing list pgsql-hackers

From Andres Freund
Subject Re: elog a stack trace
Date
Msg-id 20140502151835.GA12715@awork2.anarazel.de
Whole thread Raw
In response to elog a stack trace  (Jeff Janes <jeff.janes@gmail.com>)
List pgsql-hackers
Hi,

On 2014-05-02 08:16:39 -0700, Jeff Janes wrote:
> Does anyone have any hints on how to get a stack trace programmatically,
> rather than trying to run ps to get the pid and then attach gdb to a
> ephemeral process and hoping the situation has not been changed while you
> are doing that?  I'd like to set
> 
> log_error_verbosity = stack
> 
> or
> 
> elog_stack(,...)

There's backtrace() on several platforms. The stacktraces are less
detailed than what gdb gives you tho.

Greetings,

Andres Freund

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



pgsql-hackers by date:

Previous
From: Jeff Janes
Date:
Subject: elog a stack trace
Next
From: Josh Berkus
Date:
Subject: Re: pgaudit - an auditing extension for PostgreSQL