forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commite3ec3c0
committed
Remove arbitrary 64K-or-so limit on rangetable size.
Up to now the size of a query's rangetable has been limited by theconstants INNER_VAR et al, which mustn't be equal to any realrangetable index. 65000 doubtless seemed like enough for anybody,and it still is orders of magnitude larger than the number of joinswe can realistically handle. However, we need a rangetable entryfor each child partition that is (or might be) processed by a query.Queries with a few thousand partitions are getting more realistic,so that the day when that limit becomes a problem is in sight,even if it's not here yet. Hence, let's raise the limit.Rather than just increase the values of INNER_VAR et al, this patchadopts the approach of making them small negative values, so thatrangetables could theoretically become as long as INT_MAX.The bulk of the patch is concerned with changing Var.varno and somerelated variables from "Index" (unsigned int) to plain "int". Thisis basically cosmetic, with little actual effect other than to helpdebuggers print their values nicely. As such, I've only botheredwith changing places that could actually see INNER_VAR et al, whichthe parser and most of the planner don't. We do have to be carefulin places that are performing less/greater comparisons on varnos,but there are very few such places, other than the IS_SPECIAL_VARNOmacro itself.A notable side effect of this patch is that while it used to bepossible to add INNER_VAR et al to a Bitmapset, that will nowdraw an error. I don't see any likelihood that it wouldn't be abug to include these fake varnos in a bitmapset of real varnos,so I think this is all to the good.Although this touches outfuncs/readfuncs, I don't think a catversionbump is required, since stored rules would never contain Varswith these fake varnos.Andrey Lepikhov and Tom Lane, after a suggestion by Peter EisentrautDiscussion:https://postgr.es/m/43c7f2f5-1e27-27aa-8c65-c91859d15190@postgrespro.ru1 parent6fe0eb9 commite3ec3c0
File tree
15 files changed
+48
-57
lines changed- src
- backend
- executor
- nodes
- optimizer
- path
- plan
- prep
- utils/adt
- include
- executor
- nodes
15 files changed
+48
-57
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
282 | 282 |
| |
283 | 283 |
| |
284 | 284 |
| |
285 |
| - | |
| 285 | + | |
286 | 286 |
| |
287 | 287 |
| |
288 | 288 |
| |
|
Lines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
65 | 65 |
| |
66 | 66 |
| |
67 | 67 |
| |
68 |
| - | |
| 68 | + | |
69 | 69 |
| |
70 | 70 |
| |
71 | 71 |
| |
| |||
553 | 553 |
| |
554 | 554 |
| |
555 | 555 |
| |
556 |
| - | |
| 556 | + | |
557 | 557 |
| |
558 | 558 |
| |
559 | 559 |
| |
| |||
579 | 579 |
| |
580 | 580 |
| |
581 | 581 |
| |
582 |
| - | |
| 582 | + | |
583 | 583 |
| |
584 | 584 |
| |
585 | 585 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
31 | 31 |
| |
32 | 32 |
| |
33 | 33 |
| |
34 |
| - | |
| 34 | + | |
35 | 35 |
| |
36 | 36 |
| |
37 | 37 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
138 | 138 |
| |
139 | 139 |
| |
140 | 140 |
| |
141 |
| - | |
| 141 | + | |
142 | 142 |
| |
143 | 143 |
| |
144 | 144 |
| |
|
Lines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
63 | 63 |
| |
64 | 64 |
| |
65 | 65 |
| |
66 |
| - | |
| 66 | + | |
67 | 67 |
| |
68 | 68 |
| |
69 | 69 |
| |
| |||
85 | 85 |
| |
86 | 86 |
| |
87 | 87 |
| |
88 |
| - | |
| 88 | + | |
89 | 89 |
| |
90 | 90 |
| |
91 | 91 |
| |
| |||
100 | 100 |
| |
101 | 101 |
| |
102 | 102 |
| |
103 |
| - | |
| 103 | + | |
104 | 104 |
| |
105 | 105 |
| |
106 | 106 |
| |
| |||
131 | 131 |
| |
132 | 132 |
| |
133 | 133 |
| |
134 |
| - | |
| 134 | + | |
135 | 135 |
| |
136 | 136 |
| |
137 | 137 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1123 | 1123 |
| |
1124 | 1124 |
| |
1125 | 1125 |
| |
1126 |
| - | |
| 1126 | + | |
1127 | 1127 |
| |
1128 | 1128 |
| |
1129 | 1129 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
577 | 577 |
| |
578 | 578 |
| |
579 | 579 |
| |
580 |
| - | |
| 580 | + | |
581 | 581 |
| |
582 | 582 |
| |
583 | 583 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5961 | 5961 |
| |
5962 | 5962 |
| |
5963 | 5963 |
| |
5964 |
| - | |
| 5964 | + | |
| 5965 | + | |
5965 | 5966 |
| |
5966 | 5967 |
| |
5967 | 5968 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4805 | 4805 |
| |
4806 | 4806 |
| |
4807 | 4807 |
| |
4808 |
| - | |
| 4808 | + | |
| 4809 | + | |
4809 | 4810 |
| |
4810 | 4811 |
| |
4811 | 4812 |
| |
|
Lines changed: 14 additions & 26 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
31 | 31 |
| |
32 | 32 |
| |
33 | 33 |
| |
34 |
| - | |
| 34 | + | |
35 | 35 |
| |
36 | 36 |
| |
37 | 37 |
| |
| |||
66 | 66 |
| |
67 | 67 |
| |
68 | 68 |
| |
69 |
| - | |
| 69 | + | |
70 | 70 |
| |
71 | 71 |
| |
72 | 72 |
| |
| |||
143 | 143 |
| |
144 | 144 |
| |
145 | 145 |
| |
146 |
| - | |
| 146 | + | |
147 | 147 |
| |
148 | 148 |
| |
149 | 149 |
| |
150 |
| - | |
| 150 | + | |
151 | 151 |
| |
152 | 152 |
| |
153 | 153 |
| |
154 |
| - | |
| 154 | + | |
155 | 155 |
| |
156 | 156 |
| |
157 | 157 |
| |
| |||
163 | 163 |
| |
164 | 164 |
| |
165 | 165 |
| |
166 |
| - | |
| 166 | + | |
167 | 167 |
| |
168 | 168 |
| |
169 | 169 |
| |
| |||
505 | 505 |
| |
506 | 506 |
| |
507 | 507 |
| |
508 |
| - | |
509 |
| - | |
510 |
| - | |
511 |
| - | |
512 |
| - | |
513 |
| - | |
514 |
| - | |
515 |
| - | |
516 |
| - | |
517 |
| - | |
518 | 508 |
| |
519 | 509 |
| |
520 | 510 |
| |
| |||
1947 | 1937 |
| |
1948 | 1938 |
| |
1949 | 1939 |
| |
1950 |
| - | |
1951 |
| - | |
1952 |
| - | |
1953 |
| - | |
| 1940 | + | |
| 1941 | + | |
1954 | 1942 |
| |
1955 | 1943 |
| |
1956 | 1944 |
| |
| |||
2447 | 2435 |
| |
2448 | 2436 |
| |
2449 | 2437 |
| |
2450 |
| - | |
| 2438 | + | |
2451 | 2439 |
| |
2452 | 2440 |
| |
2453 | 2441 |
| |
| |||
2499 | 2487 |
| |
2500 | 2488 |
| |
2501 | 2489 |
| |
2502 |
| - | |
| 2490 | + | |
2503 | 2491 |
| |
2504 |
| - | |
| 2492 | + | |
2505 | 2493 |
| |
2506 | 2494 |
| |
2507 | 2495 |
| |
| |||
2539 | 2527 |
| |
2540 | 2528 |
| |
2541 | 2529 |
| |
2542 |
| - | |
| 2530 | + | |
2543 | 2531 |
| |
2544 | 2532 |
| |
2545 | 2533 |
| |
| |||
2581 | 2569 |
| |
2582 | 2570 |
| |
2583 | 2571 |
| |
2584 |
| - | |
| 2572 | + | |
2585 | 2573 |
| |
2586 | 2574 |
| |
2587 | 2575 |
| |
| |||
2799 | 2787 |
| |
2800 | 2788 |
| |
2801 | 2789 |
| |
2802 |
| - | |
| 2790 | + | |
2803 | 2791 |
| |
2804 | 2792 |
| |
2805 | 2793 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
80 | 80 |
| |
81 | 81 |
| |
82 | 82 |
| |
83 |
| - | |
| 83 | + | |
84 | 84 |
| |
85 | 85 |
| |
86 | 86 |
| |
| |||
1372 | 1372 |
| |
1373 | 1373 |
| |
1374 | 1374 |
| |
1375 |
| - | |
| 1375 | + | |
1376 | 1376 |
| |
1377 | 1377 |
| |
1378 | 1378 |
| |
|
Lines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6949 | 6949 |
| |
6950 | 6950 |
| |
6951 | 6951 |
| |
6952 |
| - | |
| 6952 | + | |
6953 | 6953 |
| |
6954 | 6954 |
| |
6955 | 6955 |
| |
| |||
6995 | 6995 |
| |
6996 | 6996 |
| |
6997 | 6997 |
| |
6998 |
| - | |
| 6998 | + | |
6999 | 6999 |
| |
7000 | 7000 |
| |
7001 | 7001 |
| |
| |||
7305 | 7305 |
| |
7306 | 7306 |
| |
7307 | 7307 |
| |
7308 |
| - | |
| 7308 | + | |
7309 | 7309 |
| |
7310 | 7310 |
| |
7311 | 7311 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
459 | 459 |
| |
460 | 460 |
| |
461 | 461 |
| |
462 |
| - | |
| 462 | + | |
463 | 463 |
| |
464 | 464 |
| |
465 | 465 |
| |
| |||
552 | 552 |
| |
553 | 553 |
| |
554 | 554 |
| |
555 |
| - | |
| 555 | + | |
556 | 556 |
| |
557 | 557 |
| |
558 | 558 |
| |
|
Lines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
24 | 24 |
| |
25 | 25 |
| |
26 | 26 |
| |
27 |
| - | |
| 27 | + | |
28 | 28 |
| |
29 | 29 |
| |
30 | 30 |
| |
31 | 31 |
| |
32 | 32 |
| |
33 | 33 |
| |
34 |
| - | |
| 34 | + | |
35 | 35 |
| |
36 | 36 |
| |
37 | 37 |
| |
38 |
| - | |
| 38 | + | |
39 | 39 |
| |
40 | 40 |
| |
41 | 41 |
| |
|
Lines changed: 8 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
172 | 172 |
| |
173 | 173 |
| |
174 | 174 |
| |
175 |
| - | |
176 |
| - | |
177 |
| - | |
178 |
| - | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
179 | 179 |
| |
180 |
| - | |
| 180 | + | |
181 | 181 |
| |
182 | 182 |
| |
183 | 183 |
| |
| |||
186 | 186 |
| |
187 | 187 |
| |
188 | 188 |
| |
189 |
| - | |
190 |
| - | |
| 189 | + | |
| 190 | + | |
191 | 191 |
| |
192 | 192 |
| |
193 | 193 |
| |
| |||
1351 | 1351 |
| |
1352 | 1352 |
| |
1353 | 1353 |
| |
| 1354 | + | |
1354 | 1355 |
| |
1355 | 1356 |
| |
1356 | 1357 |
| |
|
0 commit comments
Comments
(0)