Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-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

pgsql-hackers by date

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

pgsql-patches by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group