diff options
author | Tomas Vondra <tomas.vondra@postgresql.org> | 2025-04-04 04:28:59 +0200 |
---|---|---|
committer | Tomas Vondra <tomas.vondra@postgresql.org> | 2025-04-04 04:43:50 +0200 |
commit | 1aff1dc8dfa7584ddbc695e1aae0f767db66326f (patch) | |
tree | 5ae66e4f3e39a9bea055568030f4cca984ca17f9 /src/backend/storage/ipc | |
parent | 88f55bc97622bce000a8c90f8ef58dacc926de19 (diff) |
Revert "Improve accounting for memory used by shared hash tables"
This reverts commit f5930f9a98ea65d659d41600a138e608988ad122.
This broke the expansion of private hash tables, which reallocates the
directory. But that's impossible when it's allocated together with the
other fields, and dir_realloc() failed with BogusFree. Clearly, this
needs rethinking.
Discussion: https://postgr.es/m/CAApHDvriCiNkm=v521AP6PKPfyWkJ++jqZ9eqX4cXnhxLv8w-A@mail.gmail.com
Diffstat (limited to 'src/backend/storage/ipc')
-rw-r--r-- | src/backend/storage/ipc/shmem.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/backend/storage/ipc/shmem.c b/src/backend/storage/ipc/shmem.c index e453f856794..895a43fb39e 100644 --- a/src/backend/storage/ipc/shmem.c +++ b/src/backend/storage/ipc/shmem.c @@ -73,7 +73,6 @@ #include "storage/shmem.h" #include "storage/spin.h" #include "utils/builtins.h" -#include "utils/dynahash.h" static void *ShmemAllocRaw(Size size, Size *allocated_size); @@ -347,8 +346,7 @@ ShmemInitHash(const char *name, /* table string name for shmem index */ /* look it up in the shmem index */ location = ShmemInitStruct(name, - hash_get_size(infoP, hash_flags, - init_size, true), + hash_get_shared_size(infoP, hash_flags), &found); /* |