forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit848ef42
committed
Add the "snapshot too old" feature
This feature is controlled by a new old_snapshot_threshold GUC. Avalue of -1 disables the feature, and that is the default. Thevalue of 0 is just intended for testing. Above that it is thenumber of minutes a snapshot can reach before pruning and vacuumare allowed to remove dead tuples which the snapshot wouldotherwise protect. The xmin associated with a transaction ID doesstill protect dead tuples. A connection which is using an "old"snapshot does not get an error unless it accesses a page modifiedrecently enough that it might not be able to produce accurateresults.This is similar to the Oracle feature, and we use the same SQLSTATEand error message for compatibility.1 parent8b65cf4 commit848ef42
File tree
41 files changed
+942
-85
lines changed- contrib/bloom
- doc/src/sgml
- src
- backend
- access
- brin
- gin
- gist
- hash
- heap
- nbtree
- spgist
- commands
- storage
- buffer
- ipc
- lmgr
- utils
- misc
- time
- include
- access
- storage
- utils
- test/modules
- snapshot_too_old
- expected
- specs
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
41 files changed
+942
-85
lines changedLines changed: 2 additions & 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 | 145 |
| |
|
Lines changed: 50 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2041 | 2041 |
| |
2042 | 2042 |
| |
2043 | 2043 |
| |
| 2044 | + | |
| 2045 | + | |
| 2046 | + | |
| 2047 | + | |
| 2048 | + | |
| 2049 | + | |
| 2050 | + | |
| 2051 | + | |
| 2052 | + | |
| 2053 | + | |
| 2054 | + | |
| 2055 | + | |
| 2056 | + | |
| 2057 | + | |
| 2058 | + | |
| 2059 | + | |
| 2060 | + | |
| 2061 | + | |
| 2062 | + | |
| 2063 | + | |
| 2064 | + | |
| 2065 | + | |
| 2066 | + | |
| 2067 | + | |
| 2068 | + | |
| 2069 | + | |
| 2070 | + | |
| 2071 | + | |
| 2072 | + | |
| 2073 | + | |
| 2074 | + | |
| 2075 | + | |
| 2076 | + | |
| 2077 | + | |
| 2078 | + | |
| 2079 | + | |
2044 | 2080 |
| |
2045 | 2081 |
| |
2046 | 2082 |
| |
| |||
3051 | 3087 |
| |
3052 | 3088 |
| |
3053 | 3089 |
| |
| 3090 | + | |
| 3091 | + | |
| 3092 | + | |
| 3093 | + | |
3054 | 3094 |
| |
3055 | 3095 |
| |
3056 | 3096 |
| |
| |||
3198 | 3238 |
| |
3199 | 3239 |
| |
3200 | 3240 |
| |
| 3241 | + | |
| 3242 | + | |
| 3243 | + | |
| 3244 | + | |
| 3245 | + | |
| 3246 | + | |
| 3247 | + | |
| 3248 | + | |
| 3249 | + | |
| 3250 | + | |
3201 | 3251 |
| |
3202 | 3252 |
| |
3203 | 3253 |
| |
|
Lines changed: 11 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
135 | 135 |
| |
136 | 136 |
| |
137 | 137 |
| |
138 |
| - | |
| 138 | + | |
139 | 139 |
| |
140 | 140 |
| |
141 | 141 |
| |
| |||
152 | 152 |
| |
153 | 153 |
| |
154 | 154 |
| |
155 |
| - | |
| 155 | + | |
156 | 156 |
| |
157 | 157 |
| |
158 | 158 |
| |
| |||
285 | 285 |
| |
286 | 286 |
| |
287 | 287 |
| |
288 |
| - | |
| 288 | + | |
| 289 | + | |
289 | 290 |
| |
290 | 291 |
| |
291 | 292 |
| |
| |||
368 | 369 |
| |
369 | 370 |
| |
370 | 371 |
| |
371 |
| - | |
| 372 | + | |
| 373 | + | |
372 | 374 |
| |
373 | 375 |
| |
374 | 376 |
| |
| |||
647 | 649 |
| |
648 | 650 |
| |
649 | 651 |
| |
650 |
| - | |
| 652 | + | |
651 | 653 |
| |
652 | 654 |
| |
653 | 655 |
| |
| |||
1045 | 1047 |
| |
1046 | 1048 |
| |
1047 | 1049 |
| |
1048 |
| - | |
| 1050 | + | |
| 1051 | + | |
1049 | 1052 |
| |
1050 | 1053 |
| |
1051 | 1054 |
| |
| |||
1080 | 1083 |
| |
1081 | 1084 |
| |
1082 | 1085 |
| |
1083 |
| - | |
| 1086 | + | |
1084 | 1087 |
| |
1085 | 1088 |
| |
1086 | 1089 |
| |
| |||
1095 | 1098 |
| |
1096 | 1099 |
| |
1097 | 1100 |
| |
1098 |
| - | |
| 1101 | + | |
1099 | 1102 |
| |
1100 | 1103 |
| |
1101 | 1104 |
| |
|
Lines changed: 7 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
68 | 68 |
| |
69 | 69 |
| |
70 | 70 |
| |
71 |
| - | |
| 71 | + | |
| 72 | + | |
72 | 73 |
| |
73 | 74 |
| |
74 | 75 |
| |
| |||
77 | 78 |
| |
78 | 79 |
| |
79 | 80 |
| |
80 |
| - | |
| 81 | + | |
81 | 82 |
| |
82 | 83 |
| |
83 | 84 |
| |
| |||
187 | 188 |
| |
188 | 189 |
| |
189 | 190 |
| |
190 |
| - | |
| 191 | + | |
| 192 | + | |
191 | 193 |
| |
192 | 194 |
| |
193 | 195 |
| |
| |||
264 | 266 |
| |
265 | 267 |
| |
266 | 268 |
| |
267 |
| - | |
| 269 | + | |
| 270 | + | |
268 | 271 |
| |
269 | 272 |
| |
270 | 273 |
| |
|
Lines changed: 5 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
71 | 71 |
| |
72 | 72 |
| |
73 | 73 |
| |
74 |
| - | |
| 74 | + | |
75 | 75 |
| |
76 | 76 |
| |
77 | 77 |
| |
| |||
89 | 89 |
| |
90 | 90 |
| |
91 | 91 |
| |
92 |
| - | |
| 92 | + | |
| 93 | + | |
93 | 94 |
| |
94 | 95 |
| |
95 | 96 |
| |
| |||
115 | 116 |
| |
116 | 117 |
| |
117 | 118 |
| |
118 |
| - | |
119 |
| - | |
| 119 | + | |
| 120 | + | |
120 | 121 |
| |
121 | 122 |
| |
122 | 123 |
| |
|
Lines changed: 4 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1820 | 1820 |
| |
1821 | 1821 |
| |
1822 | 1822 |
| |
1823 |
| - | |
| 1823 | + | |
1824 | 1824 |
| |
1825 | 1825 |
| |
1826 | 1826 |
| |
| |||
1830 | 1830 |
| |
1831 | 1831 |
| |
1832 | 1832 |
| |
1833 |
| - | |
| 1833 | + | |
| 1834 | + | |
1834 | 1835 |
| |
1835 | 1836 |
| |
1836 | 1837 |
| |
1837 | 1838 |
| |
1838 | 1839 |
| |
1839 | 1840 |
| |
1840 | 1841 |
| |
1841 |
| - | |
| 1842 | + | |
1842 | 1843 |
| |
1843 | 1844 |
| |
1844 | 1845 |
|
Lines changed: 12 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
73 | 73 |
| |
74 | 74 |
| |
75 | 75 |
| |
76 |
| - | |
| 76 | + | |
77 | 77 |
| |
78 | 78 |
| |
79 | 79 |
| |
| |||
146 | 146 |
| |
147 | 147 |
| |
148 | 148 |
| |
149 |
| - | |
| 149 | + | |
| 150 | + | |
150 | 151 |
| |
151 | 152 |
| |
152 | 153 |
| |
| |||
320 | 321 |
| |
321 | 322 |
| |
322 | 323 |
| |
323 |
| - | |
| 324 | + | |
324 | 325 |
| |
325 | 326 |
| |
326 | 327 |
| |
| |||
385 | 386 |
| |
386 | 387 |
| |
387 | 388 |
| |
388 |
| - | |
| 389 | + | |
389 | 390 |
| |
390 | 391 |
| |
391 | 392 |
| |
| |||
627 | 628 |
| |
628 | 629 |
| |
629 | 630 |
| |
630 |
| - | |
| 631 | + | |
631 | 632 |
| |
632 | 633 |
| |
633 | 634 |
| |
| |||
1335 | 1336 |
| |
1336 | 1337 |
| |
1337 | 1338 |
| |
1338 |
| - | |
1339 |
| - | |
| 1339 | + | |
| 1340 | + | |
1340 | 1341 |
| |
1341 | 1342 |
| |
1342 | 1343 |
| |
| |||
1516 | 1517 |
| |
1517 | 1518 |
| |
1518 | 1519 |
| |
1519 |
| - | |
1520 |
| - | |
| 1520 | + | |
| 1521 | + | |
1521 | 1522 |
| |
1522 | 1523 |
| |
1523 | 1524 |
| |
| |||
1710 | 1711 |
| |
1711 | 1712 |
| |
1712 | 1713 |
| |
1713 |
| - | |
| 1714 | + | |
| 1715 | + | |
1714 | 1716 |
| |
1715 | 1717 |
| |
1716 | 1718 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
192 | 192 |
| |
193 | 193 |
| |
194 | 194 |
| |
195 |
| - | |
| 195 | + | |
196 | 196 |
| |
197 | 197 |
| |
198 | 198 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
336 | 336 |
| |
337 | 337 |
| |
338 | 338 |
| |
339 |
| - | |
| 339 | + | |
340 | 340 |
| |
341 | 341 |
| |
342 | 342 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
278 | 278 |
| |
279 | 279 |
| |
280 | 280 |
| |
281 |
| - | |
| 281 | + | |
| 282 | + | |
282 | 283 |
| |
283 | 284 |
| |
284 | 285 |
| |
|
Lines changed: 6 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
188 | 188 |
| |
189 | 189 |
| |
190 | 190 |
| |
191 |
| - | |
192 |
| - | |
| 191 | + | |
| 192 | + | |
193 | 193 |
| |
194 | 194 |
| |
195 | 195 |
| |
| |||
242 | 242 |
| |
243 | 243 |
| |
244 | 244 |
| |
245 |
| - | |
246 |
| - | |
| 245 | + | |
| 246 | + | |
247 | 247 |
| |
248 | 248 |
| |
249 | 249 |
| |
| |||
350 | 350 |
| |
351 | 351 |
| |
352 | 352 |
| |
| 353 | + | |
353 | 354 |
| |
354 | 355 |
| |
355 | 356 |
| |
| |||
391 | 392 |
| |
392 | 393 |
| |
393 | 394 |
| |
| 395 | + | |
394 | 396 |
| |
395 | 397 |
| |
396 | 398 |
| |
|
0 commit comments
Comments
(0)