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 C92DCD1B4E5 for ; Fri, 19 Sep 2003 04:46:11 +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 44163-05 for ; Fri, 19 Sep 2003 01:45:41 -0300 (ADT) Received: from megazone.bigpanda.com (megazone.bigpanda.com [64.147.171.210]) by svr1.postgresql.org (Postfix) with ESMTP id C205FD1B4FE for ; Fri, 19 Sep 2003 01:45:40 -0300 (ADT) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 79D5135223; Thu, 18 Sep 2003 21:45:40 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 786973520E; Thu, 18 Sep 2003 21:45:40 -0700 (PDT) Date: Thu, 18 Sep 2003 21:45:40 -0700 (PDT) From: Stephan Szabo To: Ravi T Ramachandra Cc: pgsql-admin@postgresql.org Subject: Re: Postgresql UPDATE LOCKS unrelated rows. In-Reply-To: <4223A04BF7D1B941A25246ADD0462FF5D27FFD@blr-m3-msg.wipro.com> Message-ID: <20030918214219.E83641@megazone.bigpanda.com> References: <4223A04BF7D1B941A25246ADD0462FF5D27FFD@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/314 X-Sequence-Number: 10402 On Fri, 19 Sep 2003, Ravi T Ramachandra wrote: > Here is the table structure. FYI, we tried the experiment with mysql > and the concurrency is working fine. > > create table TABLE1( TABLE_ID IDENTITY NOT NULL , > VA_ID SMALLINT NOT NULL, > > V_STATES_ID SMALLINT NOT > NULL, > V_VOL VARCHAR(6), > V_OBJ_ID INT, > V_CELL SMALLINT, > V_POOL VARCHAR(255), > FOREIGN KEY(VA_ID) REFERENCES > TABLE2(VA_ID) ON DELETE CASCADE, > FOREIGN KEY(V_STATES_ID) > REFERENCES V_STATES(V_STATES_ID), > PRIMARY KEY(TABLE_ID)); > We were trying to update V_VOL using following statement: > > UPDATE TABLE1 SET V_VOL = 'ABCD' WHERE TABLE_ID = 100000 If both of those had the same va_id or v_states_id and you're using 7.3.2, then it's probably waiting on the other transactions locks on the referenced table. It doesn't need to check if you're not changing the referencing value, but it does until a later 7.3 version I think so you may want to upgrade to 7.3.4 and try it there.