mirror of
https://github.com/postgres/postgres.git
synced 2025-08-18 12:22:09 +03:00
Fix formula in _hash_spareindex.
This was correct in earlier versions of the patch that lead to
commit ea69a0dead
, 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
This commit is contained in:
@@ -174,7 +174,8 @@ _hash_spareindex(uint32 num_bucket)
|
||||
|
||||
/* account for phases within current group */
|
||||
splitpoint_phases +=
|
||||
(((num_bucket - 1) >> (HASH_SPLITPOINT_PHASE_BITS + 1)) &
|
||||
(((num_bucket - 1) >>
|
||||
(splitpoint_group - (HASH_SPLITPOINT_PHASE_BITS + 1))) &
|
||||
HASH_SPLITPOINT_PHASE_MASK); /* to 0-based value. */
|
||||
|
||||
return splitpoint_phases;
|
||||
|
Reference in New Issue
Block a user