Your insert always pushes a new version and never stamps xmax on the prior live version. A second insert of the same key therefore succeeds instead of waiting or raising a unique violation. A later delete then closes only one of those versions, and the other value remains live under the same key.