Attempt to fix the InsertWithIdentity exception in postgres issue