forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit07cefdf
committed
Fix snapshot management, take two.
Partially revert the previous patch I installed and replace it with a moregeneral fix: any time a snapshot is pushed as Active, we need to ensure that itwill not be modified in the future. This means that if the same snapshot isused as CurrentSnapshot, it needs to be copied separately. This affectsserializable transactions only, because CurrentSnapshot has already been copiedby RegisterSnapshot and so PushActiveSnapshot does not think it needs anothercopy. However, CommandCounterIncrement would modify CurrentSnapshot, whereasActiveSnapshots must not have their command counters incremented.I say "partially" because the regression test I added for the previous bughas been kept.(This restores 8.3 behavior, because before snapmgr.c existed, any snapshot setas Active was copied.)Per bug report from Stuart Bishop in6bc73d4c0910042358k3d1adff3qa36f8df75198ecea@mail.gmail.com1 parent603e72b commit07cefdf
File tree
5 files changed
+80
-19
lines changed- src
- backend
- commands
- utils/time
- include/utils
- test/regress
- expected
- sql
5 files changed
+80
-19
lines changedLines changed: 2 additions & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
17 |
| - | |
| 17 | + | |
18 | 18 |
| |
19 | 19 |
| |
20 | 20 |
| |
| |||
47 | 47 |
| |
48 | 48 |
| |
49 | 49 |
| |
50 |
| - | |
51 | 50 |
| |
52 | 51 |
| |
53 | 52 |
| |
| |||
119 | 118 |
| |
120 | 119 |
| |
121 | 120 |
| |
122 |
| - | |
123 |
| - | |
124 |
| - | |
125 |
| - | |
126 |
| - | |
127 |
| - | |
128 |
| - | |
129 |
| - | |
130 | 121 |
| |
131 | 122 |
| |
132 | 123 |
| |
133 |
| - | |
| 124 | + | |
134 | 125 |
| |
135 | 126 |
| |
136 | 127 |
| |
|
Lines changed: 16 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
22 |
| - | |
| 22 | + | |
23 | 23 |
| |
24 | 24 |
| |
25 | 25 |
| |
| |||
104 | 104 |
| |
105 | 105 |
| |
106 | 106 |
| |
| 107 | + | |
107 | 108 |
| |
108 | 109 |
| |
109 | 110 |
| |
| |||
191 | 192 |
| |
192 | 193 |
| |
193 | 194 |
| |
194 |
| - | |
| 195 | + | |
195 | 196 |
| |
196 | 197 |
| |
197 | 198 |
| |
| |||
254 | 255 |
| |
255 | 256 |
| |
256 | 257 |
| |
257 |
| - | |
258 |
| - | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
259 | 261 |
| |
260 | 262 |
| |
261 | 263 |
| |
| |||
265 | 267 |
| |
266 | 268 |
| |
267 | 269 |
| |
268 |
| - | |
269 |
| - | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
270 | 280 |
| |
271 | 281 |
| |
272 | 282 |
| |
|
Lines changed: 1 addition & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6 | 6 |
| |
7 | 7 |
| |
8 | 8 |
| |
9 |
| - | |
| 9 | + | |
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
| |||
26 | 26 |
| |
27 | 27 |
| |
28 | 28 |
| |
29 |
| - | |
30 | 29 |
| |
31 | 30 |
| |
32 | 31 |
| |
|
Lines changed: 31 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
537 | 537 |
| |
538 | 538 |
| |
539 | 539 |
| |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
540 | 571 |
| |
541 | 572 |
| |
542 | 573 |
| |
|
Lines changed: 30 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
416 | 416 |
| |
417 | 417 |
| |
418 | 418 |
| |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
419 | 449 |
| |
420 | 450 |
| |
421 | 451 |
| |
|
0 commit comments
Comments
(0)