Re: Logging conflicted queries on deadlocks

From: "Guillaume Smet" <guillaume(dot)smet(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Gregory Stark" <stark(at)enterprisedb(dot)com>, "ITAGAKI Takahiro" <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, pgsql-patches(at)postgresql(dot)org, "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>
Subject: Re: Logging conflicted queries on deadlocks
Date: 2008-03-23 07:56:10
Message-ID: 1d4e0c10803230056h69d056fap8e2c35c463a556e7@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On Sun, Mar 23, 2008 at 3:21 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2008-03-23 11:04:32 Re: Page-at-a-time Locking Considerations
Previous Message Tom Lane 2008-03-23 02:42:08 Re: Logging conflicted queries on deadlocks

Browse pgsql-patches by date

  From Date Subject
Next Message Martin Pihlak 2008-03-23 18:05:04 stored procedure stats in collector
Previous Message Tom Lane 2008-03-23 02:42:08 Re: Logging conflicted queries on deadlocks