pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Szabo <sszabo@megazone.bigpanda.com>
To: Ravi T Ramachandra <ravi.ramachandra@wipro.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Postgresql UPDATE LOCKS unrelated rows.
Date: Thu, 18 Sep 2003 21:45:40 -0700 (PDT)
Message-ID: <20030918214219.E83641@megazone.bigpanda.com> (raw)
In-Reply-To: <4223A04BF7D1B941A25246ADD0462FF5D27FFD@blr-m3-msg.wipro.com>
References: <4223A04BF7D1B941A25246ADD0462FF5D27FFD@blr-m3-msg.wipro.com>

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.



view thread (4+ messages)

Message-ID: <20030918214219.E83641@megazone.bigpanda.com>
Permalink:  ../20030918214219.E83641@megazone.bigpanda.com/
Also on:    postgresql.org/message-id/20030918214219.E83641@megazone.bigpanda.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: sszabo@megazone.bigpanda.com, ravi.ramachandra@wipro.com
  Subject: Re: Postgresql UPDATE LOCKS unrelated rows.
  In-Reply-To: <20030918214219.E83641@megazone.bigpanda.com>
  References: <4223A04BF7D1B941A25246ADD0462FF5D27FFD@blr-m3-msg.wipro.com> <20030918214219.E83641@megazone.bigpanda.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox