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

Commitbfaa8c6

Browse files
committed
Fix calculation of PREDICATELOCK_MANAGER_LWLOCK_OFFSET.
Commitea9df81 failed to includeNUM_BUFFER_PARTITIONS in this offset, resulting in a bad offset.Ultimately this threw off NUM_FIXED_LWLOCKS which is based onearlier offsets, leading to memory allocation problems. It seemslikely to have also caused increased LWLOCK contention whenserializable transactions were used, because lightweight locks usedfor that overlapped others.Reported by Amit Kapila with analysis and fix.Backpatch to 9.4, where the bug was introduced.
1 parent9ba78fb commitbfaa8c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/include/storage/lwlock.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ extern PGDLLIMPORT LWLockPadded *MainLWLockArray;
151151
#defineLOCK_MANAGER_LWLOCK_OFFSET\
152152
(BUFFER_MAPPING_LWLOCK_OFFSET + NUM_BUFFER_PARTITIONS)
153153
#definePREDICATELOCK_MANAGER_LWLOCK_OFFSET \
154-
(NUM_INDIVIDUAL_LWLOCKS + NUM_LOCK_PARTITIONS)
154+
(LOCK_MANAGER_LWLOCK_OFFSET + NUM_LOCK_PARTITIONS)
155155
#defineNUM_FIXED_LWLOCKS \
156156
(PREDICATELOCK_MANAGER_LWLOCK_OFFSET + NUM_PREDICATELOCK_PARTITIONS)
157157

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp