Lock table, Select for update and Serialization error

From: sudhir <sudhirj(at)cse(dot)iitb(dot)ac(dot)in>
To: pgsql-general(at)postgresql(dot)org
Subject: Lock table, Select for update and Serialization error
Date: 2007-05-21 18:15:36
Message-ID: 4651E1C8.2040902@cse.iitb.ac.in
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

As per postgres docs, 'Select for update' is used to obtain row level
locks where as 'lock table' is used to obtain table level locks.

Under serializable isolation level, select for update gives error if
rows selected have been modified concurrently.
but 'lock table' does not give such error even though some of the rows
in the table are modified by concurrent transaction.

Is this the expected behavior?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Magnus Hagander 2007-05-21 19:39:40 Re: [Re] Re: Winsock error 10035 while trying to upgrade from 8.0 to 8.2
Previous Message CAJ CAJ 2007-05-21 17:59:12 Re: Perl + Determine active connections on Pg 8.0.x and Pg 8.2.x