pgsql: Move memory barrier in UnlockBufHdr to before releasing the lock

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Move memory barrier in UnlockBufHdr to before releasing the lock
Date: 2016-05-30 22:39:44
Message-ID: E1b7Vqa-0002q4-Lg@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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: -

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/87a3023c60f4bab551441492652ef19371847fd3

Modified Files
--------------
src/include/storage/buf_internals.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Noah Misch 2016-05-31 04:02:43 pgsql: Mirror struct Aggref field order in _copyAggref().
Previous Message Alvaro Herrera 2016-05-30 18:48:44 pgsql: Fix PageAddItem BRIN bug