forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit6374618
committed
Change snapshot type to be determined by enum rather than callback.
This is in preparation for allowing the same snapshot be used fordifferent table AMs. With the current callback based approach we wouldneed one callback for each supported AM, which clearly would not beextensible. Thus add a new Snapshot->snapshot_type field, and movethe dispatch into HeapTupleSatisfiesVisibility() (which is now afunction). Later work will then dispatch calls toHeapTupleSatisfiesVisibility() and other AMs visibility functionsdepending on the type of the table. The central SnapshotType enumalso seems like a good location to centralize documentation about theintended behaviour of various types of snapshots.As tqual.h isn't included by bufmgr.h any more (as HeapTupleSatisfies*isn't referenced by TestForOldSnapshot() anymore) a few files now needto include it directly.Author: Andres Freund, loosely based on earlier work by Haribabu KommiDiscussion:https://postgr.es/m/20180703070645.wchpu5muyto5n647@alap3.anarazel.dehttps://postgr.es/m/20160812231527.GA690404@alvherre.pgsql1 parent8f9e934 commit6374618
File tree
10 files changed
+161
-82
lines changed- contrib
- amcheck
- pg_visibility
- src
- backend
- access/nbtree
- replication/logical
- utils/time
- include
- storage
- utils
- tools/pgindent
10 files changed
+161
-82
lines changedLines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
36 | 36 |
| |
37 | 37 |
| |
38 | 38 |
| |
| 39 | + | |
39 | 40 |
| |
40 | 41 |
| |
41 | 42 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
21 | 21 |
| |
22 | 22 |
| |
23 | 23 |
| |
| 24 | + | |
| 25 | + | |
24 | 26 |
| |
25 | 27 |
| |
26 | 28 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
72 | 72 |
| |
73 | 73 |
| |
74 | 74 |
| |
| 75 | + | |
75 | 76 |
| |
76 | 77 |
| |
77 | 78 |
| |
|
Lines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
376 | 376 |
| |
377 | 377 |
| |
378 | 378 |
| |
379 |
| - | |
| 379 | + | |
380 | 380 |
| |
381 | 381 |
| |
382 | 382 |
| |
| |||
434 | 434 |
| |
435 | 435 |
| |
436 | 436 |
| |
437 |
| - | |
| 437 | + | |
438 | 438 |
| |
439 | 439 |
| |
440 | 440 |
| |
| |||
476 | 476 |
| |
477 | 477 |
| |
478 | 478 |
| |
479 |
| - | |
| 479 | + | |
480 | 480 |
| |
481 | 481 |
| |
482 | 482 |
| |
|
Lines changed: 5 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
141 | 141 |
| |
142 | 142 |
| |
143 | 143 |
| |
144 |
| - | |
145 |
| - | |
146 |
| - | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
147 | 147 |
| |
148 | 148 |
| |
149 | 149 |
| |
| |||
2046 | 2046 |
| |
2047 | 2047 |
| |
2048 | 2048 |
| |
2049 |
| - | |
| 2049 | + | |
2050 | 2050 |
| |
2051 | 2051 |
| |
2052 | 2052 |
| |
| |||
2143 | 2143 |
| |
2144 | 2144 |
| |
2145 | 2145 |
| |
2146 |
| - | |
| 2146 | + | |
2147 | 2147 |
| |
2148 | 2148 |
| |
2149 | 2149 |
| |
|
Lines changed: 59 additions & 27 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
78 | 78 |
| |
79 | 79 |
| |
80 | 80 |
| |
81 |
| - | |
82 |
| - | |
| 81 | + | |
| 82 | + | |
83 | 83 |
| |
84 | 84 |
| |
85 | 85 |
| |
| |||
152 | 152 |
| |
153 | 153 |
| |
154 | 154 |
| |
155 |
| - | |
156 |
| - | |
157 |
| - | |
158 |
| - | |
| 155 | + | |
159 | 156 |
| |
160 | 157 |
| |
161 | 158 |
| |
| |||
172 | 169 |
| |
173 | 170 |
| |
174 | 171 |
| |
175 |
| - | |
| 172 | + | |
176 | 173 |
| |
177 | 174 |
| |
178 | 175 |
| |
| |||
342 | 339 |
| |
343 | 340 |
| |
344 | 341 |
| |
345 |
| - | |
| 342 | + | |
346 | 343 |
| |
347 | 344 |
| |
348 | 345 |
| |
| |||
352 | 349 |
| |
353 | 350 |
| |
354 | 351 |
| |
| 352 | + | |
| 353 | + | |
355 | 354 |
| |
356 | 355 |
| |
357 | 356 |
| |
| |||
362 | 361 |
| |
363 | 362 |
| |
364 | 363 |
| |
365 |
| - | |
| 364 | + | |
366 | 365 |
| |
367 | 366 |
| |
368 | 367 |
| |
| |||
716 | 715 |
| |
717 | 716 |
| |
718 | 717 |
| |
719 |
| - | |
720 |
| - | |
721 |
| - | |
722 |
| - | |
| 718 | + | |
723 | 719 |
| |
724 | 720 |
| |
725 | 721 |
| |
| |||
735 | 731 |
| |
736 | 732 |
| |
737 | 733 |
| |
738 |
| - | |
| 734 | + | |
739 | 735 |
| |
740 | 736 |
| |
741 | 737 |
| |
| |||
934 | 930 |
| |
935 | 931 |
| |
936 | 932 |
| |
937 |
| - | |
938 |
| - | |
939 |
| - | |
940 |
| - | |
941 |
| - | |
942 |
| - | |
943 |
| - | |
944 |
| - | |
| 933 | + | |
945 | 934 |
| |
946 | 935 |
| |
947 | 936 |
| |
| |||
959 | 948 |
| |
960 | 949 |
| |
961 | 950 |
| |
962 |
| - | |
| 951 | + | |
963 | 952 |
| |
964 | 953 |
| |
965 | 954 |
| |
| |||
1390 | 1379 |
| |
1391 | 1380 |
| |
1392 | 1381 |
| |
1393 |
| - | |
1394 |
| - | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
1395 | 1386 |
| |
1396 | 1387 |
| |
1397 |
| - | |
| 1388 | + | |
1398 | 1389 |
| |
1399 | 1390 |
| |
1400 | 1391 |
| |
| |||
1659 | 1650 |
| |
1660 | 1651 |
| |
1661 | 1652 |
| |
1662 |
| - | |
| 1653 | + | |
1663 | 1654 |
| |
1664 | 1655 |
| |
1665 | 1656 |
| |
| |||
1796 | 1787 |
| |
1797 | 1788 |
| |
1798 | 1789 |
| |
| 1790 | + | |
| 1791 | + | |
| 1792 | + | |
| 1793 | + | |
| 1794 | + | |
| 1795 | + | |
| 1796 | + | |
| 1797 | + | |
| 1798 | + | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
| 1802 | + | |
| 1803 | + | |
| 1804 | + | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
| 1808 | + | |
| 1809 | + | |
| 1810 | + | |
| 1811 | + | |
| 1812 | + | |
| 1813 | + | |
| 1814 | + | |
| 1815 | + | |
| 1816 | + | |
| 1817 | + | |
| 1818 | + | |
| 1819 | + | |
| 1820 | + | |
| 1821 | + | |
| 1822 | + | |
| 1823 | + | |
| 1824 | + | |
| 1825 | + | |
| 1826 | + | |
| 1827 | + | |
| 1828 | + | |
| 1829 | + | |
| 1830 | + |
Lines changed: 2 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
20 | 20 |
| |
21 | 21 |
| |
22 | 22 |
| |
23 |
| - | |
24 | 23 |
| |
25 | 24 |
| |
26 | 25 |
| |
| |||
268 | 267 |
| |
269 | 268 |
| |
270 | 269 |
| |
271 |
| - | |
272 |
| - | |
| 270 | + | |
| 271 | + | |
273 | 272 |
| |
274 | 273 |
| |
275 | 274 |
| |
|
Lines changed: 80 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
20 | 20 |
| |
21 | 21 |
| |
22 | 22 |
| |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
23 | 102 |
| |
24 | 103 |
| |
25 | 104 |
| |
26 | 105 |
| |
27 |
| - | |
28 |
| - | |
29 |
| - | |
30 |
| - | |
31 |
| - | |
32 |
| - | |
33 |
| - | |
34 |
| - | |
35 |
| - | |
36 | 106 |
| |
37 | 107 |
| |
38 | 108 |
| |
| |||
52 | 122 |
| |
53 | 123 |
| |
54 | 124 |
| |
55 |
| - | |
| 125 | + | |
56 | 126 |
| |
57 | 127 |
| |
58 | 128 |
| |
|
0 commit comments
Comments
(0)