Re: Foreign keys causing conflicts leading toserialization failures - Mailing list pgsql-general

From Tom Lane
Subject Re: Foreign keys causing conflicts leading toserialization failures
Date
Msg-id 28326.1207150415@sss.pgh.pa.us
Whole thread Raw
In response to Re: Foreign keys causing conflicts leading toserialization failures  ("Albe Laurenz" <laurenz.albe@wien.gv.at>)
Responses Re: Foreign keys causing conflicts leading toserialization failures  ("Albe Laurenz" <laurenz.albe@wien.gv.at>)
List pgsql-general
"Albe Laurenz" <laurenz.albe@wien.gv.at> writes:
> Peter Schuller wrote:
>> This is what I am wondering. Whether it is done this way due to
>> expecation/standard, or as an implementation side effect. In the
>> latter case it is fixable.

> I don't see how this could break a standard.

Actually, I think it does, because we went to great lengths to cause
this case to error out.  It would be much simpler, code-wise, if the
RI checks just always used a current snapshot and didn't worry about
whether serializability had been violated.

(Albe's description of the implementation is largely fiction, but the
conclusion is accurate: we throw error if the referenced PK row has been
updated since the serializable transaction started.  The exact nature
of the update is not considered.)

            regards, tom lane

pgsql-general by date:

Previous
From: Ben Chobot
Date:
Subject: Re: Is there an md5sum for tables?
Next
From: carty mc
Date:
Subject: Re: dblink ,dblink_exec not participating in a Transaction??