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 14295.1059012231@sss.pgh.pa.us
Whole thread Raw
In response to Re: this is in plain text (row level locks)  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: this is in plain text (row level locks)  (Mike Mascari <mascarm@mascari.com>)
Re: this is in plain text (row level locks)  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Sailesh Krishnamurthy wrote:
>> Does pgsql only record X locks on the individual tuples on-disk or
>> does it do so for S locks as well ? 

> We don't need to shared lock individual rows because of MVCC --- well,
> we sort of do by recording our xid in our proc structure, so folks don't
> change things underneath us.  We prevent expired rows from disappearing
> from the disk by others looking at our proc start xid.

This is actually an issue though.  Row-level shared locks would be
really nice to have for foreign-key handling.  Right now we have to
use X locks for those, and that leads to deadlocking problems for
applications.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: this is in plain text (row level locks)
Next
From: Tom Lane
Date:
Subject: Re: locking mechanism