Re: Can a deferred FK constraint cause "enq: TX - row lock contention" in Share (4) mode?

From: Thomas Kellerer <thomas.kellerer_at_mgm-tp.com>
Date: Mon, 07 Jul 2014 07:51:48 +0200
Message-ID: <53BA3574.9040506_at_mgm-tp.com>



Jonathan,

thanks for your answers.

> One scenario I've created which matches one set of your symptoms:
>
> Foreign key is deferrable initially deferred.
> Session 1 inserts a new parent key value - without commiting.
> Session 2 updates a child row changing a value that exists in the parent table to the new, uncommitted, parent value.
>
> Session 2 goes into TX mode 4 waiting for session 1 to commit; showing -1 as the current_obj#

I will need to discuss with the developers how exactly the code deals with the inserts, but this will help a lot in that discussion. Maybe it's possible to do all the parent inserts first.

Regards
Thomas

--
http://www.freelists.org/webpage/oracle-l
Received on Mon Jul 07 2014 - 07:51:48 CEST

Original text of this message