Andres Freund <andres@anarazel.de> writes:
> FWIW, I'd not be surprised if moving to atomics would often cause *slowdowns*
> compared to using the spinlocks. You'd replace one atomic operation with
> dozens, to update all those fields individually. With loads of cacheline
> pingpong inbetween.
Not only that, but you'd no longer have any semblance of read-consistency
between the fields of a stats entry.
regards, tom lane