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

From Bruce Momjian
Subject Re: this is in plain text (row level locks)
Date
Msg-id 200307240521.h6O5LrG02796@candle.pha.pa.us
Whole thread Raw
In response to Re: this is in plain text (row level locks)  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: this is in plain text (row level locks)
List pgsql-hackers
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > Tom Lane wrote:
> >> 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.
> 
> > Is the plan to allow one backend to shared lock the row while others can
> > read it but not modify it, or is the idea to actually allow multiple
> > backends to record their shared status on the row?
> 
> Plan?  We have no plan to fix this :-(.  But clearly there has to be
> some way to tell which backends hold read locks on a shared-locked row,
> else you can't tell if they've all dropped the lock or not.

I suppose we could allow one backend to mark the page with a shared lock
for primary key purposes while others read it.  Does that buy us
anything?

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


pgsql-hackers by date:

Previous
From: Arguile
Date:
Subject: Re: DBD::Pg, schema support
Next
From: Tom Lane
Date:
Subject: Re: this is in plain text (row level locks)