Skip to content

Commit 81c5e46

Browse files
committed
Introduce 64-bit hash functions with a 64-bit seed.
This will be useful for hash partitioning, which needs a way to seed the hash functions to avoid problems such as a hash index on a hash partitioned table clumping all values into a small portion of the bucket space; it's also useful for anything that wants a 64-bit hash value rather than a 32-bit hash value. Just in case somebody wants a 64-bit hash value that is compatible with the existing 32-bit hash values, make the low 32-bits of the 64-bit hash value match the 32-bit hash value when the seed is 0. Robert Haas and Amul Sul Discussion: http://postgr.es/m/CA+Tgmoafx2yoJuhCQQOL5CocEi-w_uG4S2xT0EtgiJnPGcHW3g@mail.gmail.com
1 parent 2d44c58 commit 81c5e46

33 files changed

+1555
-42
lines changed

doc/src/sgml/xindex.sgml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,8 @@
436436
</table>
437437

438438
<para>
439-
Hash indexes require one support function, shown in <xref
439+
Hash indexes require one support function, and allow a second one to be
440+
supplied at the operator class author's option, as shown in <xref
440441
linkend="xindex-hash-support-table">.
441442
</para>
442443

@@ -451,9 +452,17 @@
451452
</thead>
452453
<tbody>
453454
<row>
454-
<entry>Compute the hash value for a key</entry>
455+
<entry>Compute the 32-bit hash value for a key</entry>
455456
<entry>1</entry>
456457
</row>
458+
<row>
459+
<entry>
460+
Compute the 64-bit hash value for a key given a 64-bit salt; if
461+
the salt is 0, the low 32 bits will match the value that would
462+
have been computed by function 1
463+
</entry>
464+
<entry>2</entry>
465+
</row>
457466
</tbody>
458467
</tgroup>
459468
</table>

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