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?
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