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

Commit87a3023

Browse files
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 parent975ad4e commit87a3023

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
@@ -242,8 +242,8 @@ extern PGDLLIMPORT LWLockMinimallyPadded *BufferIOLWLockArray;
242242
externuint32LockBufHdr(BufferDesc*desc);
243243
#defineUnlockBufHdr(desc,s)\
244244
do {\
245-
pg_atomic_write_u32(&(desc)->state, (s) & (~BM_LOCKED)); \
246245
pg_write_barrier(); \
246+
pg_atomic_write_u32(&(desc)->state, (s) & (~BM_LOCKED)); \
247247
} while (0)
248248

249249

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp