forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitf867ce5
committed
ExecHashRemoveNextSkewBucket must physically copy tuples to main hashtable.
Commit45f6240 added an assumption in ExecHashIncreaseNumBatchesand ExecHashIncreaseNumBuckets that they could find all tuples in the mainhash table by iterating over the "dense storage" introduced by that patch.However, ExecHashRemoveNextSkewBucket continued its old practice of simplyre-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 issuesand should be reworked rather completely; but there is no time for thatright now, so band-aid the problem by making ExecHashRemoveNextSkewBucketphysically copy deleted skew tuples into the "dense storage" arena.The added test case is able to exhibit the problem by means of fooling theplanner with a WHERE condition that it will underestimate the selectivityof, causing the initial nbatch estimate to be too small.Tomas Vondra and Tom Lane. Thanks to David Johnston for initialinvestigation into the bug report.1 parentd89f06f commitf867ce5
File tree
3 files changed
+57
-2
lines changed- src
- backend/executor
- test/regress
- expected
- sql
3 files changed
+57
-2
lines changedLines changed: 13 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1575 | 1575 |
| |
1576 | 1576 |
| |
1577 | 1577 |
| |
1578 |
| - | |
1579 |
| - | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
| 1581 | + | |
| 1582 | + | |
| 1583 | + | |
| 1584 | + | |
| 1585 | + | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
1580 | 1591 |
| |
1581 | 1592 |
| |
1582 | 1593 |
| |
|
Lines changed: 28 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2331 | 2331 |
| |
2332 | 2332 |
| |
2333 | 2333 |
| |
| 2334 | + | |
| 2335 | + | |
| 2336 | + | |
| 2337 | + | |
| 2338 | + | |
| 2339 | + | |
| 2340 | + | |
| 2341 | + | |
| 2342 | + | |
| 2343 | + | |
| 2344 | + | |
| 2345 | + | |
| 2346 | + | |
| 2347 | + | |
| 2348 | + | |
| 2349 | + | |
| 2350 | + | |
| 2351 | + | |
| 2352 | + | |
| 2353 | + | |
| 2354 | + | |
| 2355 | + | |
| 2356 | + | |
| 2357 | + | |
| 2358 | + | |
| 2359 | + | |
| 2360 | + | |
| 2361 | + | |
2334 | 2362 |
| |
2335 | 2363 |
| |
2336 | 2364 |
| |
|
Lines changed: 16 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
463 | 463 |
| |
464 | 464 |
| |
465 | 465 |
| |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
466 | 482 |
| |
467 | 483 |
| |
468 | 484 |
| |
|
0 commit comments
Comments
(0)