- Notifications
You must be signed in to change notification settings - Fork4.9k
Commitb81b5a9
committed
Unbreak Finalize HashAggregate over Partial HashAggregate.
Commit5dfc198 introduced the useof a new type of hash table with linear reprobing for hash aggregates.Such a hash table behaves very poorly if keys are inserted in hashorder, which does in fact happen in the case where a query use aFinalize HashAggregate node fed (via Gather) by a PartialHashAggregate node. In fact, queries with this type of plan tendto run effectively forever.Fix that by seeding the hash value differently in each worker(and in the leader, if it participates).Andres Freund and Robert Haas1 parent6a4fe11 commitb81b5a9
File tree
7 files changed
+30
-8
lines changed- src
- backend/executor
- include
- executor
- nodes
7 files changed
+30
-8
lines changedLines changed: 18 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
18 | 18 |
| |
19 | 19 |
| |
20 | 20 |
| |
| 21 | + | |
| 22 | + | |
21 | 23 |
| |
22 | 24 |
| |
23 | 25 |
| |
| |||
289 | 291 |
| |
290 | 292 |
| |
291 | 293 |
| |
292 |
| - | |
| 294 | + | |
| 295 | + | |
293 | 296 |
| |
294 | 297 |
| |
295 | 298 |
| |
| |||
314 | 317 |
| |
315 | 318 |
| |
316 | 319 |
| |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
317 | 333 |
| |
318 | 334 |
| |
319 | 335 |
| |
| |||
450 | 466 |
| |
451 | 467 |
| |
452 | 468 |
| |
453 |
| - | |
| 469 | + | |
454 | 470 |
| |
455 | 471 |
| |
456 | 472 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1723 | 1723 |
| |
1724 | 1724 |
| |
1725 | 1725 |
| |
1726 |
| - | |
| 1726 | + | |
| 1727 | + | |
1727 | 1728 |
| |
1728 | 1729 |
| |
1729 | 1730 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
43 | 43 |
| |
44 | 44 |
| |
45 | 45 |
| |
46 |
| - | |
| 46 | + | |
| 47 | + | |
47 | 48 |
| |
48 | 49 |
| |
49 | 50 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
130 | 130 |
| |
131 | 131 |
| |
132 | 132 |
| |
133 |
| - | |
| 133 | + | |
| 134 | + | |
134 | 135 |
| |
135 | 136 |
| |
136 | 137 |
| |
|
Lines changed: 4 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
510 | 510 |
| |
511 | 511 |
| |
512 | 512 |
| |
513 |
| - | |
| 513 | + | |
| 514 | + | |
514 | 515 |
| |
515 | 516 |
| |
516 | 517 |
| |
| |||
529 | 530 |
| |
530 | 531 |
| |
531 | 532 |
| |
532 |
| - | |
| 533 | + | |
| 534 | + | |
533 | 535 |
| |
534 | 536 |
| |
535 | 537 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
143 | 143 |
| |
144 | 144 |
| |
145 | 145 |
| |
146 |
| - | |
| 146 | + | |
147 | 147 |
| |
148 | 148 |
| |
149 | 149 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
533 | 533 |
| |
534 | 534 |
| |
535 | 535 |
| |
| 536 | + | |
536 | 537 |
| |
537 | 538 |
| |
538 | 539 |
| |
|
0 commit comments
Comments
(0)