Move memory barrier in UnlockBufHdr to before releasing the lock.

Andres Freund <andres@anarazel.de>

Commit: 87a3023c60f4bab551441492652ef19371847fd3
Author: Andres Freund <andres@anarazel.de>
Date: 2016-05-30T22:35:53Z
Releases: 9.6.0
Move memory barrier in UnlockBufHdr to before releasing the lock.

This bug appears to have been introduced late in the development of
48354581a4 ("Allow Pin/UnpinBuffer to operate in a lockfree
manner.").

Found while debugging a bug which turned out to be independent of the
commit mentioned above.

Backpatch: -

Files

PathChange+/−
src/include/storage/buf_internals.h modified +1 −1