cancel
Showing results for 
Search instead for 
Did you mean: 

How is "CHECK ON COMMIT" supposed to work?

Former Member
4,216

Hello guys,

I have a question regarding the "CHECK ON COMMIT" foreign key option during a table creation. When should I set this on/off?

I ask that because we are facing some weird bug in our system.

In a specific screen we execute a "UPDATE ... WHERE id = ?", where id has a foreign key to another table. However, this statement fails in some situations with a foreign key violation over "id" column (no ids are updated by this statement).

The weird part is that all the FK violations happens when this statement is executed along with a synchronism.

I was thinking that the "update" fails because the statement is executed after the referenced id is removed from database, by the synchronism.

Could you enlighten me with some insights about what could be happening?

Accepted Solutions (0)

Answers (0)