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

Поиск
Список
Период
Сортировка
Excerpts from Robert Haas's message of mar sep 06 19:57:07 -0300 2011:
> On Tue, Sep 6, 2011 at 6:05 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > 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?
> 
> Surely you're kidding.  These are customer systems which I frequently
> don't even have access to.  They don't always have gdb installed
> (sometimes they are Windows systems) and if they do the customer isn't
> likely to know how to use it, and even if they do they don't think the
> better of us for needing such a tool to troubleshoot a crash.

I'm with Robert on this ... been there, got that look.


> TBH, I'm very unclear what could cause the postmaster to go belly-up
> copying a bounded amount of data out of shared memory for logging
> purposes only.  It's surely possible to make the code safe against any
> sequence of bytes that might be found there.

A mishandled encoding conversion could be problematic, so that needs to
be carefully considered (perhaps just shut off unconditionally).

-- 
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: custom variables and PGC_SUSET issue
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: problem of win32.mak