diff options
Diffstat (limited to 'src/backend/storage/lmgr/lock.c')
-rw-r--r-- | src/backend/storage/lmgr/lock.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/backend/storage/lmgr/lock.c b/src/backend/storage/lmgr/lock.c index cbe95747564..173c9db52e2 100644 --- a/src/backend/storage/lmgr/lock.c +++ b/src/backend/storage/lmgr/lock.c @@ -373,7 +373,6 @@ void InitLocks(void) { HASHCTL info; - int hash_flags; long init_table_size, max_table_size; bool found; @@ -392,15 +391,13 @@ InitLocks(void) MemSet(&info, 0, sizeof(info)); info.keysize = sizeof(LOCKTAG); info.entrysize = sizeof(LOCK); - info.hash = tag_hash; info.num_partitions = NUM_LOCK_PARTITIONS; - hash_flags = (HASH_ELEM | HASH_FUNCTION | HASH_PARTITION); LockMethodLockHash = ShmemInitHash("LOCK hash", init_table_size, max_table_size, &info, - hash_flags); + HASH_ELEM | HASH_BLOBS | HASH_PARTITION); /* Assume an average of 2 holders per lock */ max_table_size *= 2; @@ -414,13 +411,12 @@ InitLocks(void) info.entrysize = sizeof(PROCLOCK); info.hash = proclock_hash; info.num_partitions = NUM_LOCK_PARTITIONS; - hash_flags = (HASH_ELEM | HASH_FUNCTION | HASH_PARTITION); LockMethodProcLockHash = ShmemInitHash("PROCLOCK hash", init_table_size, max_table_size, &info, - hash_flags); + HASH_ELEM | HASH_FUNCTION | HASH_PARTITION); /* * Allocate fast-path structures. @@ -445,13 +441,11 @@ InitLocks(void) info.keysize = sizeof(LOCALLOCKTAG); info.entrysize = sizeof(LOCALLOCK); - info.hash = tag_hash; - hash_flags = (HASH_ELEM | HASH_FUNCTION); LockMethodLocalHash = hash_create("LOCALLOCK hash", 16, &info, - hash_flags); + HASH_ELEM | HASH_BLOBS); } |