Re: table-level and 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: table-level and row-level locks.
Date: 2003-07-11 15:17:57
Message-ID: 11887.1057936677@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:
> <html><div style='background-color:'><DIV>Iam trying to acquire rowlevel locks in postgresql. I try doing this: </DIV>
> <DIV>&nbsp;'select * from students where name='Larry' for update;</DIV>
> <DIV>But by looking at the holding array of proclock , I've noticed that by doing this only
> <DT>AccessShareLock gets acquired which is a table level lock. </DT>

Please do not use HTML mail on this list ...

Anyway, the answer to your question is that row locks are recorded on
disk (by marking the tuple as locked). We'd soon run out of memory
if we tried to record them in the shared lock table.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2003-07-11 19:37:28 btree fast-root on VACUUM FULL
Previous Message Zeno R.R. Davatz 2003-07-11 06:40:29 corrupt data