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

From Stephan Szabo
Subject Re: Referential Integrity and SHARE locks
Date
Msg-id 20070202102821.S73863@megazone.bigpanda.com
Whole thread Raw
In response to Referential Integrity and SHARE locks  ("Simon Riggs" <simon@2ndquadrant.com>)
Responses Re: Referential Integrity and SHARE locks  ("Simon Riggs" <simon@2ndquadrant.com>)
List pgsql-hackers
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.


pgsql-hackers by date:

Previous
From: Kate F
Date:
Subject: Re: Function proposal to find the type of a datum
Next
From: imad
Date:
Subject: Re: PL/pgSQL RENAME functionality in TODOs