Re: [PATCH] Log crashed backend's query (activity string)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Marti Raudsepp <marti(at)juffo(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Log crashed backend's query (activity string)
Date: 2011-09-06 22:05:46
Message-ID: 2793.1315346746@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Tue, Sep 6, 2011 at 5:34 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2011-09-06 22:09:44 Re: [PATCH] Log crashed backend's query (activity string)
Previous Message Marti Raudsepp 2011-09-06 22:02:44 Re: [PATCH] Log crashed backend's query (activity string)