Move memory barrier in UnlockBufHdr to before releasing the lock.
authorAndres Freund <andres@anarazel.de>
Mon, 30 May 2016 22:35:53 +0000 (15:35 -0700)
committerAndres Freund <andres@anarazel.de>
Mon, 30 May 2016 22:35:53 +0000 (15:35 -0700)
commit87a3023c60f4bab551441492652ef19371847fd3
treeaa3e48e51f4fae1351696d223651402323272eba
parent975ad4e602ff5793f2e57cfc883780dd5ff645a0
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: -
src/include/storage/buf_internals.h