Re: this is in plain text (row level locks)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Jenny -" <nat_lazy(at)hotmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: this is in plain text (row level locks)
Date: 2003-07-24 00:36:30
Message-ID: 13800.1059006990@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Jenny -" <nat_lazy(at)hotmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sailesh Krishnamurthy 2003-07-24 01:12:21 Re: this is in plain text (row level locks)
Previous Message Bruce Momjian 2003-07-23 23:09:41 Re: SELECT FOR UPDATE NOWAIT