Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/src/backend/utils/hash/dynahash.c b/src/backend/utils/hash/dynahash.c
- index 3babde8d70..d5a576d9c1 100644
- --- a/src/backend/utils/hash/dynahash.c
- +++ b/src/backend/utils/hash/dynahash.c
- @@ -99,6 +99,7 @@
- #include "access/xact.h"
- #include "common/hashfn.h"
- #include "port/pg_bitutils.h"
- +#include "port/atomics.h"
- #include "storage/shmem.h"
- #include "storage/spin.h"
- #include "utils/dynahash.h"
- @@ -196,6 +197,8 @@ struct HASHHDR
- int sshift; /* segment shift = log2(ssize) */
- int nelem_alloc; /* number of entries to allocate at once */
- + pg_atomic_uint64 allocated;
- +
- #ifdef HASH_STATISTICS
- /*
- @@ -1742,6 +1745,7 @@ element_alloc(HTAB *hashp, int nelem, int freelist_idx)
- if (IS_PARTITIONED(hctl))
- SpinLockRelease(&hctl->freeList[freelist_idx].mutex);
- + pg_atomic_fetch_add_u64(&hctl->allocated, nelem);
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement