forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit79e0f87
committed
Use type "int64" for memory accounting in tuplesort.c/tuplestore.c.
Commit263865a switched tuplesort.c andtuplestore.c variables representing memory usage from type "long" totype "Size". This was unnecessary; I thought doing so avoided overflowscenarios on 64-bit Windows, but guc.c already limited work_mem so as toprevent the overflow. It was also incomplete, not touching the logicthat assumed a signed data type. Change the affected variables to"int64". This is perfect for 64-bit platforms, and it reduces the needto contemplate platform-specific overflow scenarios. It also puts usclose to being able to support work_mem over 2 GiB on 64-bit Windows.Per report from Andres Freund.1 parent7842d41 commit79e0f87
File tree
3 files changed
+25
-21
lines changed- src
- backend/utils/sort
- include/utils
3 files changed
+25
-21
lines changedLines changed: 16 additions & 14 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
211 | 211 |
| |
212 | 212 |
| |
213 | 213 |
| |
214 |
| - | |
215 |
| - | |
| 214 | + | |
| 215 | + | |
216 | 216 |
| |
217 | 217 |
| |
218 | 218 |
| |
| |||
308 | 308 |
| |
309 | 309 |
| |
310 | 310 |
| |
311 |
| - | |
| 311 | + | |
312 | 312 |
| |
313 | 313 |
| |
314 | 314 |
| |
| |||
565 | 565 |
| |
566 | 566 |
| |
567 | 567 |
| |
568 |
| - | |
| 568 | + | |
569 | 569 |
| |
570 | 570 |
| |
571 | 571 |
| |
| |||
980 | 980 |
| |
981 | 981 |
| |
982 | 982 |
| |
983 |
| - | |
| 983 | + | |
984 | 984 |
| |
985 | 985 |
| |
986 | 986 |
| |
| |||
991 | 991 |
| |
992 | 992 |
| |
993 | 993 |
| |
994 |
| - | |
| 994 | + | |
995 | 995 |
| |
996 | 996 |
| |
997 | 997 |
| |
| |||
1048 | 1048 |
| |
1049 | 1049 |
| |
1050 | 1050 |
| |
1051 |
| - | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
1052 | 1054 |
| |
1053 | 1055 |
| |
1054 | 1056 |
| |
| |||
1067 | 1069 |
| |
1068 | 1070 |
| |
1069 | 1071 |
| |
1070 |
| - | |
| 1072 | + | |
1071 | 1073 |
| |
1072 | 1074 |
| |
1073 | 1075 |
| |
| |||
1722 | 1724 |
| |
1723 | 1725 |
| |
1724 | 1726 |
| |
1725 |
| - | |
| 1727 | + | |
1726 | 1728 |
| |
1727 | 1729 |
| |
1728 | 1730 |
| |
| |||
1756 | 1758 |
| |
1757 | 1759 |
| |
1758 | 1760 |
| |
1759 |
| - | |
| 1761 | + | |
1760 | 1762 |
| |
1761 | 1763 |
| |
1762 | 1764 |
| |
| |||
1805 | 1807 |
| |
1806 | 1808 |
| |
1807 | 1809 |
| |
1808 |
| - | |
| 1810 | + | |
1809 | 1811 |
| |
1810 | 1812 |
| |
1811 | 1813 |
| |
| |||
2033 | 2035 |
| |
2034 | 2036 |
| |
2035 | 2037 |
| |
2036 |
| - | |
| 2038 | + | |
2037 | 2039 |
| |
2038 | 2040 |
| |
2039 | 2041 |
| |
| |||
2107 | 2109 |
| |
2108 | 2110 |
| |
2109 | 2111 |
| |
2110 |
| - | |
| 2112 | + | |
2111 | 2113 |
| |
2112 | 2114 |
| |
2113 | 2115 |
| |
| |||
2228 | 2230 |
| |
2229 | 2231 |
| |
2230 | 2232 |
| |
2231 |
| - | |
| 2233 | + | |
2232 | 2234 |
| |
2233 | 2235 |
| |
2234 | 2236 |
| |
|
Lines changed: 8 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
104 | 104 |
| |
105 | 105 |
| |
106 | 106 |
| |
107 |
| - | |
108 |
| - | |
| 107 | + | |
| 108 | + | |
109 | 109 |
| |
110 | 110 |
| |
111 | 111 |
| |
| |||
550 | 550 |
| |
551 | 551 |
| |
552 | 552 |
| |
553 |
| - | |
| 553 | + | |
554 | 554 |
| |
555 | 555 |
| |
556 | 556 |
| |
| |||
561 | 561 |
| |
562 | 562 |
| |
563 | 563 |
| |
564 |
| - | |
| 564 | + | |
565 | 565 |
| |
566 | 566 |
| |
567 | 567 |
| |
| |||
618 | 618 |
| |
619 | 619 |
| |
620 | 620 |
| |
621 |
| - | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
622 | 624 |
| |
623 | 625 |
| |
624 | 626 |
| |
| |||
637 | 639 |
| |
638 | 640 |
| |
639 | 641 |
| |
640 |
| - | |
| 642 | + | |
641 | 643 |
| |
642 | 644 |
| |
643 | 645 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
106 | 106 |
| |
107 | 107 |
| |
108 | 108 |
| |
109 |
| - | |
| 109 | + | |
110 | 110 |
| |
111 | 111 |
| |
112 | 112 |
| |
|
0 commit comments
Comments
(0)