Re: elog a stack trace

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: elog a stack trace
Date: 2014-05-02 15:18:35
Message-ID: 20140502151835.GA12715@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2014-05-02 15:34:37 Re: pgsql: Fix "quiet inline" configure test for newer clang compilers.
Previous Message Jeff Janes 2014-05-02 15:16:39 elog a stack trace