Understanding trigger behavior
I cannot figure out what exactly is the problem, but I suggest that you add something like this after the update of table_a:

IF NOT FOUND THEN
   RAISE EXCEPTION 'row % in table_a not found!', NEW.recida;
END IF;


Then at least you can keep the inconsistency from happening.

If the trigger fails, all the effects of the statement and the trigger will be rolled back, because they are always in a single transaction.