Re: 'Waiting on lock' - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: 'Waiting on lock'
Date
Msg-id 20070530153934.GY7531@tamriel.snowman.net
Whole thread Raw
In response to Re: 'Waiting on lock'  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: 'Waiting on lock'  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: 'Waiting on lock'  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
* Tom Lane (tgl@sss.pgh.pa.us) wrote:
> Stephen Frost <sfrost@snowman.net> writes:
> >   It'd be nice to have a NOTICE printed when a wait-on-lock takes longer
> >   than a few seconds.
>
> It'd be relatively painless to make that happen as part of the
> deadlock-check timeout function, but that's typically only a one-second
> delay not a "few seconds".  I think it'd likely be overly chatty.

Yeah, I wouldn't want one per second.  Do we already track how long
we've been waiting?  Easy enough to % off that if we do, or just have a
local boolean variable of "have we printed the wait-on-lock notice yet?"
and only print it once when we first drop into the timeout function.

I really was thinking it'd only be printed once since I expect this to
be going to an interactive session where someone's going to notice a
'NOTICE' being sent.  I could maybe see another message when we actually
aquire the lock being sent if we've sent the 'wait-on-lock' message.
Thanks,
    Stephen

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: 'Waiting on lock'
Next
From: Peter Eisentraut
Date:
Subject: Postmaster startup messages