Subject Transaction waits
Author Roland Turcan

I have two tables:

TABLE_A (ID integer)
TABLE_B (ID integer, TABLE_A_ID integer)

TABLE_B.TABLE_A_ID has foreign key to TABLE_A.ID

TABLE_A contains a row e.g. with ID=5

one transaction updates the row with "update TABLE_A set id=id
where id=5", but doesn't commit its change.

second transaction wants to execute this statement:

"insert into TABLE_B (ID, TABLE_A_ID) values (1, 5);"

but the execution of insert command is stopped until the first
transaction doesn't commit or roll back.

Why does the second transaction wait?


PS: I prefer WAIT transactions.

Best regards, TRoland