I don't think that using a client side generated id is actually a real step in optimizing. Except the case you block all writes to the db.
And, if you've got a serial column, you're going go have a primary key/uniqueness constraint on it. Retrying that when it fails at interesting times is going to cost far more time and brain cells than letting the db do it.