Re: Table locking problems?

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Dan Harris <fbsd(at)drivefaster(dot)net>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Table locking problems?
Date: 2005-08-09 18:52:01
Message-ID: 20050809185201.GA25325@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2005-08-09 19:00:59 Re: Why hash join instead of nested loop?
Previous Message Rhett Garber 2005-08-09 18:51:30 Re: Why hash join instead of nested loop?