Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5a24efd

Browse files
anarazelAlexander Korotkov
authored and
Alexander Korotkov
committed
Move memory barrier in UnlockBufHdr to before releasing the lock.
This bug appears to have been introduced late in the development of4835458 ("Allow Pin/UnpinBuffer to operate in a lockfreemanner.").Found while debugging a bug which turned out to be independent of thecommit mentioned above.Backpatch: -
1 parent73adc14 commit5a24efd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/include/storage/buf_internals.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,8 @@ typedef union BufferDescPadded
230230
externuint32LockBufHdr(BufferDesc*desc);
231231
#defineUnlockBufHdr(desc,s)\
232232
do {\
233-
pg_atomic_write_u32(&(desc)->state, (s) & (~BM_LOCKED)); \
234233
pg_write_barrier(); \
234+
pg_atomic_write_u32(&(desc)->state, (s) & (~BM_LOCKED)); \
235235
} while (0)
236236

237237

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp