Fix performance problems in multi-batch hash joins by ensuring that we select
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 1 Jun 2007 15:58:02 +0000 (15:58 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 1 Jun 2007 15:58:02 +0000 (15:58 +0000)
commit3e2c198e06a5c67f8adbcaf53c7d65ed504c72dd
treee9093c26f1453212417f3b57578412886555673c
parent9a4c943747ebfcdc16c9869a7380b9805a9a0889
Fix performance problems in multi-batch hash joins by ensuring that we select
a well-randomized batch number even when given a poorly-randomized hash value.
This is a bit inefficient but seems the only practical solution given the
constraint that we can't change the hash functions in released branches.
Per report from Joseph Shraibman.

Applied to 8.1 and 8.2 only --- HEAD is getting a cleaner fix, and 8.0 and
before use different coding that seems less vulnerable.
src/backend/access/hash/hashfunc.c
src/backend/executor/nodeHash.c
src/include/access/hash.h