X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 6FE26529F1 for ; Tue, 9 Aug 2005 15:52:15 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 12400-04 for ; Tue, 9 Aug 2005 18:52:12 +0000 (GMT) Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by svr1.postgresql.org (Postfix) with ESMTP id CE5DB52A1D for ; Tue, 9 Aug 2005 15:52:08 -0300 (ADT) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.3/8.13.3) with ESMTP id j79Iq1sJ045377 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 9 Aug 2005 12:52:03 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.3/8.13.3) with ESMTP id j79Iq1iZ025404; Tue, 9 Aug 2005 12:52:01 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.3/8.13.3/Submit) id j79Iq1cN025403; Tue, 9 Aug 2005 12:52:01 -0600 (MDT) (envelope-from mfuhr) Date: Tue, 9 Aug 2005 12:52:01 -0600 From: Michael Fuhr To: Dan Harris Cc: pgsql-performance@postgresql.org Subject: Re: Table locking problems? Message-ID: <20050809185201.GA25325@winnie.fuhr.org> References: <52CFA236-FC43-4018-B399-1854240110FF@drivefaster.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <52CFA236-FC43-4018-B399-1854240110FF@drivefaster.net> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.005 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200508/86 X-Sequence-Number: 13833 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