Commit 24d8595
committed
Introduce LogicalTapeSetExtend().
Increases the number of tapes in a logical tape set. This will be
important for disk-based hash aggregation, because the maximum number
of tapes is not known ahead of time.
While discussing this change, it was observed to regress the
performance of Sort for at least one test case. The performance
regression was because some versions of GCC switch to an inlined
version of memcpy() in LogicalTapeWrite() after this change. No
performance regression for clang was observed.
Because the regression is due to an arbitrary decision by the
compiler, I decided it shouldn't hold up this change. If it needs to
be fixed, we can find a workaround.
Author: Adam Lee, Jeff Davis
Discussion: https://postgr.es/m/e54bfec11c59689890f277722aaaabd05f78e22c.camel%40j-davis.com1 parent 17d3fcd commit 24d8595Copy full SHA for 24d8595
Expand file treeCollapse file tree
2 files changed
+47
-27
lines changedOpen diff view settings
Collapse file
src/backend/utils/sort/logtape.c
Copy file name to clipboardExpand all lines: src/backend/utils/sort/logtape.c+46-27Lines changed: 46 additions & 27 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
191 | 191 | |
192 | 192 | |
193 | 193 | |
194 | | - |
195 | | - |
| 194 | + |
| 195 | + |
196 | 196 | |
197 | 197 | |
198 | 198 | |
| ||
201 | 201 | |
202 | 202 | |
203 | 203 | |
| 204 | + |
204 | 205 | |
205 | 206 | |
206 | 207 | |
| ||
536 | 537 | |
537 | 538 | |
538 | 539 | |
| 540 | + |
| 541 | + |
| 542 | + |
| 543 | + |
| 544 | + |
| 545 | + |
| 546 | + |
| 547 | + |
| 548 | + |
| 549 | + |
| 550 | + |
| 551 | + |
| 552 | + |
| 553 | + |
| 554 | + |
| 555 | + |
| 556 | + |
| 557 | + |
| 558 | + |
| 559 | + |
| 560 | + |
539 | 561 | |
540 | 562 | |
541 | 563 | |
| ||
579 | 601 | |
580 | 602 | |
581 | 603 | |
582 | | - |
583 | 604 | |
584 | 605 | |
585 | 606 | |
586 | 607 | |
587 | 608 | |
588 | 609 | |
589 | | - |
590 | | - |
| 610 | + |
591 | 611 | |
592 | 612 | |
593 | 613 | |
| ||
596 | 616 | |
597 | 617 | |
598 | 618 | |
| 619 | + |
599 | 620 | |
600 | | - |
601 | | - |
602 | | - |
603 | | - |
604 | | - |
605 | | - |
606 | 621 | |
607 | | - |
608 | | - |
609 | | - |
610 | | - |
611 | | - |
612 | | - |
613 | | - |
614 | | - |
615 | | - |
616 | | - |
617 | | - |
618 | | - |
619 | | - |
620 | | - |
621 | | - |
622 | | - |
| 622 | + |
623 | 623 | |
624 | 624 | |
625 | 625 | |
| ||
1004 | 1004 | |
1005 | 1005 | |
1006 | 1006 | |
| 1007 | + |
| 1008 | + |
| 1009 | + |
| 1010 | + |
| 1011 | + |
| 1012 | + |
| 1013 | + |
| 1014 | + |
| 1015 | + |
| 1016 | + |
| 1017 | + |
| 1018 | + |
| 1019 | + |
| 1020 | + |
| 1021 | + |
| 1022 | + |
| 1023 | + |
| 1024 | + |
| 1025 | + |
1007 | 1026 | |
1008 | 1027 | |
1009 | 1028 | |
|
Collapse file
src/include/utils/logtape.h
Copy file name to clipboardExpand all lines: src/include/utils/logtape.h+1Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
67 | 67 | |
68 | 68 | |
69 | 69 | |
| 70 | + |
70 | 71 | |
71 | 72 | |
72 | 73 | |
|
0 commit comments