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

From Simon Riggs
Subject Re: 'Waiting on lock'
Date
Msg-id 1180688110.26297.64.camel@silverbirch.site
Whole thread Raw
In response to Re: 'Waiting on lock'  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Wed, 2007-05-30 at 12:27 -0400, Tom Lane wrote:
> Stephen Frost <sfrost@snowman.net> writes:
> > * Tom Lane (tgl@sss.pgh.pa.us) wrote:
> >> 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?
> 
> No, because we're *asleep*.  You'd have to add an additional
> timeout-interrupt reason.  Plus there's a ton of interesting questions
> about what's safe to do from an interrupt service routine.
> 
> In fact, I am scandalized to see that someone has inserted a boatload
> of elog calls into CheckDeadLock since 8.2 --- that seems entirely
> unsafe.  [ checks revision history... ]
> 
> 2007-03-03 13:46  momjian
> 
>     * doc/src/sgml/config.sgml, src/backend/storage/lmgr/deadlock.c,
>     src/backend/storage/lmgr/proc.c, src/backend/utils/misc/guc.c,
>     src/backend/utils/misc/postgresql.conf.sample,
>     src/include/storage/lock.h, src/include/storage/proc.h: Add GUC
>     log_lock_waits to log long wait times.
>     
>     Simon Riggs
> 
> Bruce, Simon, kindly fix this or revert it.

'twas me. Looking at it now.

Good news is the semantics are exactly what Stephen has requested...

--  Simon Riggs              EnterpriseDB   http://www.enterprisedb.com




pgsql-hackers by date:

Previous
From: "Simon Riggs"
Date:
Subject: Re: Feature freeze status report
Next
From: "Simon Riggs"
Date:
Subject: Re: Postmaster startup messages