Re: this is in plain text (row level locks) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: this is in plain text (row level locks)
Date
Msg-id 13800.1059006990@sss.pgh.pa.us
Whole thread Raw
In response to this is in plain text (row level locks)  ("Jenny -" <nat_lazy@hotmail.com>)
Responses Re: this is in plain text (row level locks)  (Sailesh Krishnamurthy <sailesh@cs.berkeley.edu>)
List pgsql-hackers
"Jenny -" <nat_lazy@hotmail.com> writes:
> Iam trying to acquire rowlevel locks in postgresql. I try doing this:
> 'select * from students where name='Larry' for update;
> But by looking at the holding array of proclock , I've noticed that by doing 
> this only
> AccessShareLock gets acquired which is a table level lock.

Row-level locks are not recorded in proclock --- they are implemented by
marking the individual tuple on-disk.  If we tried to record them in
shared memory, it'd be very easy to run out of shared memory, because
you could be holding row locks on a large number of tuples.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: SELECT FOR UPDATE NOWAIT
Next
From: Sailesh Krishnamurthy
Date:
Subject: Re: this is in plain text (row level locks)