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 08:02:26 -0700 (PDT)
Message-ID: <20030918080137.I66580@megazone.bigpanda.com> (raw)
In-Reply-To: <4223A04BF7D1B941A25246ADD0462FF5D27E9B@blr-m3-msg.wipro.com>
References: <4223A04BF7D1B941A25246ADD0462FF5D27E9B@blr-m3-msg.wipro.com>


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?




view thread (4+ messages)  latest in thread

Message-ID: <20030918080137.I66580@megazone.bigpanda.com>
Permalink:  ../20030918080137.I66580@megazone.bigpanda.com/
Also on:    postgresql.org/message-id/20030918080137.I66580@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: <20030918080137.I66580@megazone.bigpanda.com>
  References: <4223A04BF7D1B941A25246ADD0462FF5D27E9B@blr-m3-msg.wipro.com> <20030918080137.I66580@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