X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 2DEB8D1B52A for ; Thu, 18 Sep 2003 15:02:43 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 82880-01 for ; Thu, 18 Sep 2003 12:02:32 -0300 (ADT) Received: from megazone.bigpanda.com (megazone.bigpanda.com [64.147.171.210]) by svr1.postgresql.org (Postfix) with ESMTP id 455D4D1B513 for ; Thu, 18 Sep 2003 12:02:32 -0300 (ADT) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 37E993527F; Thu, 18 Sep 2003 08:02:26 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 368273527C; Thu, 18 Sep 2003 08:02:26 -0700 (PDT) Date: Thu, 18 Sep 2003 08:02:26 -0700 (PDT) From: Stephan Szabo To: Ravi T Ramachandra Cc: pgsql-admin@postgresql.org Subject: Re: Postgresql UPDATE LOCKS unrelated rows. In-Reply-To: <4223A04BF7D1B941A25246ADD0462FF5D27E9B@blr-m3-msg.wipro.com> Message-ID: <20030918080137.I66580@megazone.bigpanda.com> References: <4223A04BF7D1B941A25246ADD0462FF5D27E9B@blr-m3-msg.wipro.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/309 X-Sequence-Number: 10397 On Thu, 18 Sep 2003, Ravi T Ramachandra wrote: > > Hi, > > We are using postgresql 7.3.2 on lunux platform. We performed locking > test as follows via JDBC: > > Started 2 concurrent transaction with autocommit false and isolation > READ_COMMITTED : > > Transaction 1: > =========== > Update row 1 > Sleep for 30 seconds > commit: > > Transaction 2: > =========== > Updated row 10000 > commit > > The second update had to wait for the first update operation to finish. > We also made sure that the 2 unrelated rows are not on the same page. > > Is this expected behavior ? > Does update lock the whole table ? Generally not, but you really haven't given alot of information. What is the table layout for the table in question? Are there foreign keys involved?