summaryrefslogtreecommitdiff
path: root/src/backend/storage/buffer/buf_table.c
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2025-09-17 20:28:43 -0400
committerAndres Freund <andres@anarazel.de>2025-09-17 20:28:43 -0400
commit0110e2ec5c0f230beb439885bd1f8505e783e742 (patch)
tree6d9bf5ce8b791992246a38f78f4918637f481ffb /src/backend/storage/buffer/buf_table.c
parentb0cc0a71e0a0a760f54c72edb8cd000e4555442b (diff)
Mark shared buffer lookup table HASH_FIXED_SIZE
StrategyInitialize() calls InitBufTable() with maximum number of entries that the buffer lookup table can ever have. Thus there should not be any need to allocate more element after initialization. Hence mark the hash table as fixed sized. Author: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com> Discussion: https://postgr.es/m/CAExHW5v0jh3F_wj86yC=qBfWk0uiT94qy=Z41uzAHLHh0SerRA@mail.gmail.com
Diffstat (limited to 'src/backend/storage/buffer/buf_table.c')
-rw-r--r--src/backend/storage/buffer/buf_table.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/storage/buffer/buf_table.c b/src/backend/storage/buffer/buf_table.c
index a50955d5286..9d256559bab 100644
--- a/src/backend/storage/buffer/buf_table.c
+++ b/src/backend/storage/buffer/buf_table.c
@@ -62,7 +62,7 @@ InitBufTable(int size)
SharedBufHash = ShmemInitHash("Shared Buffer Lookup Table",
size, size,
&info,
- HASH_ELEM | HASH_BLOBS | HASH_PARTITION);
+ HASH_ELEM | HASH_BLOBS | HASH_PARTITION | HASH_FIXED_SIZE);
}
/*