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

From Alvaro Herrera
Subject Re: elog a stack trace
Date
Msg-id 20140506163208.GU6018@eldon.alvh.no-ip.org
Whole thread Raw
In response to Re: elog a stack trace  ("MauMau" <maumau307@gmail.com>)
List pgsql-hackers
MauMau wrote:

> On Windows, you can use Stackwalk() or Stackwalk64() Win32 API.
> Several years ago, for some software, I implemented a feature that
> outputs the stack trace of a crashing process to its server log
> file.
> 
> It would be very nice if PostgreSQL outputs the stack trace of a
> crashing postgres process in the server log.  That eliminates the
> need for users in many cases to send the huge core files to the
> support staff or to use the debugger to get the stack trace.  I've
> recently heard that MySQL has this feature.

+1, assuming it can be made to work reliably and does not cause a larger
reliability problem.  I see the GNU extension to get backtraces, for
instance, tries to malloc stuff in order to get a human-readable trace,
which might not be all that great.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Sending out a request for more buildfarm animals?
Next
From: Andres Freund
Date:
Subject: Re: doPickSplit stack buffer overflow in XLogInsert?