you could avoid that problem with serializable transactions, but it would still be a slower solution i think.