Re: Referential Integrity and SHARE locks - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Referential Integrity and SHARE locks
Date
Msg-id 1170447585.3645.81.camel@silverbirch.site
Whole thread Raw
In response to Re: Referential Integrity and SHARE locks  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
List pgsql-hackers
On Fri, 2007-02-02 at 10:35 -0800, Stephan Szabo wrote:
> On Fri, 2 Feb 2007, Simon Riggs wrote:
> 
> > It sounds like if we don't put a SHARE lock on the referenced table then
> > we can end the transaction in an inconsistent state if the referenced
> > table has concurrent UPDATEs or DELETEs. BUT those operations do impose
> > locking rules back onto the referencing tables that would not be granted
> > until after any changes to the referencing table complete, whereupon
> > they would restrict or cascade. So an inconsistent state doesn't seem
> > possible to me.
> 
> What locking back to the referencing table are you thinking about? The row
> locks are insufficient because that doesn't prevent an insert of a
> new row that matches the criteria previously locked against AFAIK.

Probably best to read the later posts; this one was at the beginning of
my thought train, so is slightly off track, as later posters remind me.

--  Simon Riggs              EnterpriseDB   http://www.enterprisedb.com




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Proposed adjustments in MaxTupleSize and toast thresholds
Next
From: Tom Lane
Date:
Subject: Re: problem of geometric operator in v8.2.1