aboutsummaryrefslogtreecommitdiff
path: root/src/backend/regex/regexec.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2016-02-07 12:29:17 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2016-02-07 12:29:17 -0500
commit129db3cbee704e71cff9f90f62691488c8ef768d (patch)
tree0b95878b4088d81bdd3b4cf4bc99d9572546b0f3 /src/backend/regex/regexec.c
parent2b94b5ef8df1b037307634f8d0f881e2651d654e (diff)
downloadpostgresql-129db3cbee704e71cff9f90f62691488c8ef768d.tar.gz
postgresql-129db3cbee704e71cff9f90f62691488c8ef768d.zip
ExecHashRemoveNextSkewBucket must physically copy tuples to main hashtable.
Commit 45f6240a8fa9d355 added an assumption in ExecHashIncreaseNumBatches and ExecHashIncreaseNumBuckets that they could find all tuples in the main hash table by iterating over the "dense storage" introduced by that patch. However, ExecHashRemoveNextSkewBucket continued its old practice of simply re-linking deleted skew tuples into the main table's hashchains. Hence, such tuples got lost during any subsequent increase in nbatch or nbuckets, and would never get joined, as reported in bug #13908 from Seth P. I (tgl) think that the aforesaid commit has got multiple design issues and should be reworked rather completely; but there is no time for that right now, so band-aid the problem by making ExecHashRemoveNextSkewBucket physically copy deleted skew tuples into the "dense storage" arena. The added test case is able to exhibit the problem by means of fooling the planner with a WHERE condition that it will underestimate the selectivity of, causing the initial nbatch estimate to be too small. Tomas Vondra and Tom Lane. Thanks to David Johnston for initial investigation into the bug report.
Diffstat (limited to 'src/backend/regex/regexec.c')
0 files changed, 0 insertions, 0 deletions