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

Re: 'Waiting on lock'

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: 'Waiting on lock'
Date: 2007-05-30 15:39:35
Message-ID: 20070530153934.GY7531@tamriel.snowman.net (view raw or flat)
Thread:
Lists: pgsql-hackers
* Tom Lane (tgl(at)sss(dot)pgh(dot)pa(dot)us) wrote:
> Stephen Frost <sfrost(at)snowman(dot)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

In response to

Responses

pgsql-hackers by date

Next:From: Peter EisentrautDate: 2007-05-30 15:57:17
Subject: Postmaster startup messages
Previous:From: Tom LaneDate: 2007-05-30 15:27:57
Subject: Re: 'Waiting on lock'

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