Content-Length: 260478 | pFad | http://github.com/postgrespro/postgres/commit/b38006ef6d1ba2f56cc4962ed17956b74c9fa0c4

71 Fix formula in _hash_spareindex. · postgrespro/postgres@b38006e · GitHub
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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/b38006ef6d1ba2f56cc4962ed17956b74c9fa0c4

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy