> I still don't see how dirty reads can solve the RI problems.
> If Xact A deletes a PK while Xact B inserts an FK, one of
> them will either see the new reference or the PK gone. But
> from a transactional POV it depends on if the opposite Xact
> finally commits or not to tell if that really happened.
>
> With dirty read, you only get "maybe my PK is gone" or "maybe
> there is a reference".
Yes, and so we'll write special function(s) to check was PK really
gone/FK inserted or not. This funcs will call
XactLockTableWait(t_xmin|t_xmax) for questionable tuple to wait for
concurrent transaction commit/rollback. It will work as long as we
call RI triggers *after* INSERT/UPDATE/DELETE op, so triggers can
see concurrent changes with dirty reads.
Vadim