Re: Bug: Deferred FKey Check Happening on Double Update, Not Single - Mailing list pgsql-bugs

From Andrew Gierth
Subject Re: Bug: Deferred FKey Check Happening on Double Update, Not Single
Date
Msg-id 87tvh4k5m5.fsf@news-spur.riddles.org.uk
Whole thread Raw
In response to Re: Bug: Deferred FKey Check Happening on Double Update, Not Single  (Doug Safreno <doug@avinetworks.com>)
Responses Re: Bug: Deferred FKey Check Happening on Double Update, Not Single
List pgsql-bugs
>>>>> "Doug" == Doug Safreno <doug@avinetworks.com> writes:

 Doug> Hey Sergei,

 Doug> Neither transaction touches FK fields - so shouldn't they both
 Doug> skip FK trigger check?

The optimization that lets the check be skipped only applies on the
_first_ modification of the row within the transaction. On the second or
subsequent modifications, the code can't easily tell whether the row was
inserted in the current transaction (in which case the optimization must
be skipped) or just modified, so it assumes the worst.

-- 
Andrew (irc:RhodiumToad)


pgsql-bugs by date:

Previous
From: Doug Safreno
Date:
Subject: Re: Bug: Deferred FKey Check Happening on Double Update, Not Single
Next
From: Doug Safreno
Date:
Subject: Re: Bug: Deferred FKey Check Happening on Double Update, Not Single