Re: [PATCH] Log crashed backend's query (activity string) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCH] Log crashed backend's query (activity string)
Date
Msg-id 2793.1315346746@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PATCH] Log crashed backend's query (activity string)  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: [PATCH] Log crashed backend's query (activity string)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Tue, Sep 6, 2011 at 5:34 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> And I doubt
>> that the goal is worth taking risks for.

> I am unable to count the number of times that I have had a customer
> come to me and say "well, the backend crashed".  And I go look at
> their logs and I have no idea what happened.

gdb and print debug_query_string?

I don't dispute that this would be nice to have.  But I don't think that
it's sane to compromise the postmaster's reliability in order to print
information of doubtful accuracy.

If you want to do something that doesn't violate the system's basic
design goals, think about setting up a SIGSEGV handler that tries to
print debug_query_string via elog before crashing.  It might well crash
too, but it won't be risking taking out more of the database with it.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Marti Raudsepp
Date:
Subject: Re: [PATCH] Log crashed backend's query (activity string)
Next
From: "Kevin Grittner"
Date:
Subject: Re: [PATCH] Log crashed backend's query (activity string)