Re: Table locking problems?

From: Michael Fuhr
Subject: Re: Table locking problems?
Date: ,
Msg-id: 20050809185201.GA25325@winnie.fuhr.org
(view: Whole thread, Raw)
In response to: Table locking problems?  (Dan Harris)
List: pgsql-performance

Tree view

Table locking problems?  (Dan Harris, )
 Re: Table locking problems?  ("Joshua D. Drake", )
  Re: Table locking problems?  (Tom Lane, )
   Re: Table locking problems?  (Dan Harris, )
 Re: Table locking problems?  (Michael Fuhr, )
 Re: Table locking problems?  (Steve Poe, )
  Re: Table locking problems?  (Dan Harris, )
   Re: Table locking problems?  (John A Meinel, )
    Re: Table locking problems?  (Dan Harris, )
     Re: Table locking problems?  (John A Meinel, )

On Tue, Aug 09, 2005 at 12:04:11PM -0600, Dan Harris wrote:
> These changes have definitely improved performance, but I am now
> finding some trouble with UPDATE or DELETE queries "hanging" and
> never releasing their locks.  As this happens, other statements queue
> up behind it.

Have you examined pg_locks to see if the UPDATE or DELETE is blocked
because of a lock another session holds?

Are you using foreign keys?  When updating referencing rows, released
versions of PostgreSQL acquire a lock on the referenced row that can
hurt concurrency or cause deadlock (this will be improved in 8.1).

--
Michael Fuhr


pgsql-performance by date:

From: John A Meinel
Date:
Subject: Re: Table locking problems?
From: Tobias Brox
Date:
Subject: partial index regarded more expensive