diff options
| author | Nathan Bossart <nathan@postgresql.org> | 2025-12-04 15:42:18 -0600 |
|---|---|---|
| committer | Nathan Bossart <nathan@postgresql.org> | 2025-12-04 15:42:18 -0600 |
| commit | 80f6e2fb4addb03e2e163a380b5e6e1f4b321286 (patch) | |
| tree | fd4e081bd558bf98ddda9f80e76d7ca2ceb1da13 /src | |
| parent | e158fd4d68f44d0872c1d2053067fe306cc9d2b2 (diff) | |
Fix key size of PrivateRefCountHash.
The key is the first member of PrivateRefCountEntry, which has type
Buffer. This commit changes the key size from sizeof(int32) to
sizeof(Buffer). This appears to be an oversight in commit
4b4b680c3d, but it's of no consequence because Buffer has been a
signed 32-bit integer for a long time.
Author: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Discussion: https://postgr.es/m/aS77DTpl0fOkIKSZ%40ip-10-97-1-34.eu-west-3.compute.internal
Diffstat (limited to 'src')
| -rw-r--r-- | src/backend/storage/buffer/bufmgr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c index 62f420dd344..ce52d6ca81f 100644 --- a/src/backend/storage/buffer/bufmgr.c +++ b/src/backend/storage/buffer/bufmgr.c @@ -4019,7 +4019,7 @@ InitBufferManagerAccess(void) memset(&PrivateRefCountArray, 0, sizeof(PrivateRefCountArray)); - hash_ctl.keysize = sizeof(int32); + hash_ctl.keysize = sizeof(Buffer); hash_ctl.entrysize = sizeof(PrivateRefCountEntry); PrivateRefCountHash = hash_create("PrivateRefCount", 100, &hash_ctl, |
