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

Commit4c37c1e

Browse files
committed
Reduce the initial size of local lock hash to 16 entries.
The hash table is seq scanned at transaction end, to release all locks,and making the hash table larger than necessary makes that slower. Withvery simple queries, that overhead can amount to a few percent of the totalCPU time used.At the moment, backend startup needs 6 locks, and a simple query with onetable and index needs 3 locks. 16 is enough for even quite complicatedtransactions, and it will grow automatically if it fills up.
1 parentf536d41 commit4c37c1e

File tree

1 file changed

+1
-1
lines changed
  • src/backend/storage/lmgr

1 file changed

+1
-1
lines changed

‎src/backend/storage/lmgr/lock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ InitLocks(void)
346346
hash_flags= (HASH_ELEM |HASH_FUNCTION);
347347

348348
LockMethodLocalHash=hash_create("LOCALLOCK hash",
349-
128,
349+
16,
350350
&info,
351351
hash_flags);
352352
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp