Skip to content

Commit b38006e

Browse files
committed
Fix formula in _hash_spareindex.
This was correct in earlier versions of the patch that lead to commit ea69a0d, but somehow got broken in the last version which I actually committed. Mithun Cy, per an off-list report from Ashutosh Sharma Discussion: http://postgr.es/m/CAD__OujbAwNU71v1y-RoQxZ8LZ6-V2UFTkex3v34MK6uZ3Xb5w@mail.gmail.com
1 parent ea69a0d commit b38006e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/backend/access/hash/hashutil.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,8 @@ _hash_spareindex(uint32 num_bucket)
174174

175175
/* account for phases within current group */
176176
splitpoint_phases +=
177-
(((num_bucket - 1) >> (HASH_SPLITPOINT_PHASE_BITS + 1)) &
177+
(((num_bucket - 1) >>
178+
(splitpoint_group - (HASH_SPLITPOINT_PHASE_BITS + 1))) &
178179
HASH_SPLITPOINT_PHASE_MASK); /* to 0-based value. */
179180

180181
return splitpoint_phases;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy