Improved error handling for commit failures, happens especially when using initially deferred for foreign keys