Move memory barrier in UnlockBufHdr to before releasing the lock.
Andres Freund <andres@anarazel.de>
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
| Path | Change | +/− |
|---|---|---|
| src/include/storage/buf_internals.h | modified | +1 −1 |