Re: Table locking problems? - Mailing list pgsql-performance

From Michael Fuhr
Subject Re: Table locking problems?
Date
Msg-id 20050809185201.GA25325@winnie.fuhr.org
Whole thread Raw
In response to Table locking problems?  (Dan Harris <fbsd@drivefaster.net>)
List pgsql-performance
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:

Previous
From: Rhett Garber
Date:
Subject: Re: Why hash join instead of nested loop?
Next
From: Tom Lane
Date:
Subject: Re: Why hash join instead of nested loop?