forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit895a94d
committed
Avoid incrementing the CommandCounter when CommandCounterIncrement is called
but no database changes have been made since the last CommandCounterIncrement.This should result in a significant improvement in the number of "commands"that can typically be performed within a transaction before hitting the 2^32CommandId size limit. In particular this buys back (and more) the possibleadverse consequences of my previous patch to fix plan caching behavior.The implementation requires tracking whether the current CommandCountervalue has been "used" to mark any tuples. CommandCounter values stored intosnapshots are presumed not to be used for this purpose. This requires somesmall executor changes, since the executor used to conflate the curcid ofthe snapshot it was using with the command ID to mark output tuples with.Separating these concepts allows some small simplifications in executor APIs.Something for the TODO list: look into having CommandCounterIncrement not doAcceptInvalidationMessages. It seems fairly bogus to be doing it there,but exactly where to do it instead isn't clear, and I'm disinclined to messwith asynchronous behavior during late beta.1 parentf0f18c7 commit895a94d
File tree
20 files changed
+217
-252
lines changed- contrib/pgrowlocks
- src
- backend
- access
- heap
- transam
- commands
- executor
- storage/ipc
- utils
- cache
- time
- include
- access
- commands
- executor
- nodes
- test/regress
- expected
- sql
20 files changed
+217
-252
lines changedLines changed: 4 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 |
| - | |
| 2 | + | |
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
| |||
117 | 117 |
| |
118 | 118 |
| |
119 | 119 |
| |
120 |
| - | |
121 |
| - | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
122 | 123 |
| |
123 | 124 |
| |
124 | 125 |
| |
|
Lines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
1891 | 1891 |
| |
1892 | 1892 |
| |
1893 | 1893 |
| |
1894 |
| - | |
| 1894 | + | |
1895 | 1895 |
| |
1896 | 1896 |
| |
1897 | 1897 |
| |
| |||
2174 | 2174 |
| |
2175 | 2175 |
| |
2176 | 2176 |
| |
2177 |
| - | |
| 2177 | + | |
2178 | 2178 |
| |
2179 | 2179 |
| |
2180 | 2180 |
| |
| |||
2817 | 2817 |
| |
2818 | 2818 |
| |
2819 | 2819 |
| |
2820 |
| - | |
| 2820 | + | |
2821 | 2821 |
| |
2822 | 2822 |
| |
2823 | 2823 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
1086 | 1086 |
| |
1087 | 1087 |
| |
1088 | 1088 |
| |
1089 |
| - | |
| 1089 | + | |
1090 | 1090 |
| |
1091 | 1091 |
| |
1092 | 1092 |
| |
|
Lines changed: 51 additions & 16 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
13 |
| - | |
| 13 | + | |
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
| |||
161 | 161 |
| |
162 | 162 |
| |
163 | 163 |
| |
| 164 | + | |
164 | 165 |
| |
165 | 166 |
| |
166 | 167 |
| |
| |||
435 | 436 |
| |
436 | 437 |
| |
437 | 438 |
| |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
438 | 444 |
| |
439 | 445 |
| |
440 |
| - | |
| 446 | + | |
441 | 447 |
| |
442 | 448 |
| |
| 449 | + | |
| 450 | + | |
443 | 451 |
| |
444 | 452 |
| |
445 | 453 |
| |
| |||
566 | 574 |
| |
567 | 575 |
| |
568 | 576 |
| |
569 |
| - | |
570 |
| - | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
571 | 585 |
| |
572 |
| - | |
573 |
| - | |
574 |
| - | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
575 | 592 |
| |
576 |
| - | |
| 593 | + | |
| 594 | + | |
577 | 595 |
| |
578 |
| - | |
579 |
| - | |
580 |
| - | |
581 |
| - | |
582 |
| - | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
583 | 611 |
| |
584 | 612 |
| |
585 |
| - | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
586 | 620 |
| |
587 |
| - | |
588 | 621 |
| |
589 | 622 |
| |
590 | 623 |
| |
| |||
1416 | 1449 |
| |
1417 | 1450 |
| |
1418 | 1451 |
| |
| 1452 | + | |
1419 | 1453 |
| |
1420 | 1454 |
| |
1421 | 1455 |
| |
| |||
4007 | 4041 |
| |
4008 | 4042 |
| |
4009 | 4043 |
| |
4010 |
| - | |
| 4044 | + | |
4011 | 4045 |
| |
4012 | 4046 |
| |
4013 | 4047 |
| |
4014 | 4048 |
| |
4015 | 4049 |
| |
4016 | 4050 |
| |
| 4051 | + | |
4017 | 4052 |
| |
4018 | 4053 |
| |
4019 | 4054 |
| |
|
Lines changed: 3 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| |||
562 | 562 |
| |
563 | 563 |
| |
564 | 564 |
| |
565 |
| - | |
| 565 | + | |
| 566 | + | |
566 | 567 |
| |
567 | 568 |
| |
568 | 569 |
| |
|
Lines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
1033 | 1033 |
| |
1034 | 1034 |
| |
1035 | 1035 |
| |
1036 |
| - | |
| 1036 | + | |
1037 | 1037 |
| |
1038 | 1038 |
| |
1039 | 1039 |
| |
| |||
1637 | 1637 |
| |
1638 | 1638 |
| |
1639 | 1639 |
| |
1640 |
| - | |
| 1640 | + | |
1641 | 1641 |
| |
1642 | 1642 |
| |
1643 | 1643 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| |||
233 | 233 |
| |
234 | 234 |
| |
235 | 235 |
| |
236 |
| - | |
| 236 | + | |
237 | 237 |
| |
238 | 238 |
| |
239 | 239 |
| |
|
Lines changed: 11 additions & 18 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| |||
51 | 51 |
| |
52 | 52 |
| |
53 | 53 |
| |
54 |
| - | |
55 | 54 |
| |
56 | 55 |
| |
57 | 56 |
| |
| |||
1801 | 1800 |
| |
1802 | 1801 |
| |
1803 | 1802 |
| |
1804 |
| - | |
1805 |
| - | |
| 1803 | + | |
1806 | 1804 |
| |
1807 | 1805 |
| |
1808 | 1806 |
| |
| |||
1814 | 1812 |
| |
1815 | 1813 |
| |
1816 | 1814 |
| |
1817 |
| - | |
| 1815 | + | |
1818 | 1816 |
| |
1819 | 1817 |
| |
1820 | 1818 |
| |
| |||
1871 | 1869 |
| |
1872 | 1870 |
| |
1873 | 1871 |
| |
1874 |
| - | |
1875 |
| - | |
1876 |
| - | |
| 1872 | + | |
1877 | 1873 |
| |
1878 | 1874 |
| |
1879 | 1875 |
| |
| |||
1952 | 1948 |
| |
1953 | 1949 |
| |
1954 | 1950 |
| |
1955 |
| - | |
1956 |
| - | |
| 1951 | + | |
1957 | 1952 |
| |
1958 | 1953 |
| |
1959 | 1954 |
| |
| |||
1965 | 1960 |
| |
1966 | 1961 |
| |
1967 | 1962 |
| |
1968 |
| - | |
| 1963 | + | |
1969 | 1964 |
| |
1970 | 1965 |
| |
1971 | 1966 |
| |
| |||
2025 | 2020 |
| |
2026 | 2021 |
| |
2027 | 2022 |
| |
2028 |
| - | |
2029 |
| - | |
2030 |
| - | |
| 2023 | + | |
2031 | 2024 |
| |
2032 | 2025 |
| |
2033 | 2026 |
| |
| |||
2038 | 2031 |
| |
2039 | 2032 |
| |
2040 | 2033 |
| |
2041 |
| - | |
| 2034 | + | |
2042 | 2035 |
| |
2043 | 2036 |
| |
2044 | 2037 |
| |
| |||
2060 | 2053 |
| |
2061 | 2054 |
| |
2062 | 2055 |
| |
2063 |
| - | |
| 2056 | + | |
| 2057 | + | |
2064 | 2058 |
| |
2065 | 2059 |
| |
2066 | 2060 |
| |
| |||
2086 | 2080 |
| |
2087 | 2081 |
| |
2088 | 2082 |
| |
2089 |
| - | |
2090 |
| - | |
| 2083 | + | |
2091 | 2084 |
| |
2092 | 2085 |
| |
2093 | 2086 |
| |
|
0 commit comments
Comments
(0)