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

Re: 'Waiting on lock'

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org, Bruce Momjian <bruce(at)momjian(dot)us>, "Simon Riggs" <simon(at)2ndquadrant(dot)com>
Subject: Re: 'Waiting on lock'
Date: 2007-05-30 16:27:22
Message-ID: 4821.1180542442@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Stephen Frost <sfrost(at)snowman(dot)net> writes:
> * Tom Lane (tgl(at)sss(dot)pgh(dot)pa(dot)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.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Alvaro HerreraDate: 2007-05-30 16:33:45
Subject: Re: 'Waiting on lock'
Previous:From: Peter EisentrautDate: 2007-05-30 16:18:02
Subject: Style of file error messages

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