Re: Logging conflicted queries on deadlocks - Mailing list pgsql-patches

From Guillaume Smet
Subject Re: Logging conflicted queries on deadlocks
Date
Msg-id 1d4e0c10803230056h69d056fap8e2c35c463a556e7@mail.gmail.com
Whole thread Raw
In response to Re: Logging conflicted queries on deadlocks  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
On Sun, Mar 23, 2008 at 3:21 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> I wrote:
> > A conservative approach would be to report the query texts *only* in the
>  > server log and never to the client --- this would need a bit of klugery
>  > but seems doable.
>
>  Anybody have any opinions about changing this or sticking with the
>  behavior as-submitted?  It doesn't seem like an open-and-shut issue
>  to me.

From my experience, client apps usually don't report the information
about deadlock in a useful way (and they often don't report anything
at all except a standard error message). We usually dig into the
server log to find the information (and it's often useless because we
(currently) don't have information about the queries involved so we
log all queries for a while to have more debugging information).

So my point is that having all the information we can collect in the
server log is essential. I don't think the client app can do anything
useful with the query texts: they usually hide this sort of technical
details.

--
Guillaume

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: Logging conflicted queries on deadlocks
Next
From: Martin Pihlak
Date:
Subject: stored procedure stats in collector