Re: Postgresql UPDATE LOCKS unrelated rows.

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: Ravi T Ramachandra <ravi(dot)ramachandra(at)wipro(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Postgresql UPDATE LOCKS unrelated rows.
Date: 2003-09-18 15:02:26
Message-ID: 20030918080137.I66580@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin


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?

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Kuhn, Dylan K (4520500D) 2003-09-18 15:16:20 Re: dump among different versions of postgreSQL
Previous Message Rhaoni Chiu Pereira 2003-09-18 14:45:09 Re: [PERFORM] How to force an Index ?