- Notifications
You must be signed in to change notification settings - Fork5
Commit8f9b959
committed
Handle duplicate XIDs in txid_snapshot.
The proc array can contain duplicate XIDs, when a transaction is just beingprepared for two-phase commit. To cope, remove any duplicates intxid_current_snapshot(). Also ignore duplicates in the input functions, sothat if e.g. you have an old pg_dump file that already contains duplicates,it will be accepted.Report and fix by Jan Wieck. Backpatch to all supported versions.1 parentbb38fb0 commit8f9b959
3 files changed
+54
-17
lines changedLines changed: 47 additions & 12 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
131 | 131 |
| |
132 | 132 |
| |
133 | 133 |
| |
134 |
| - | |
| 134 | + | |
| 135 | + | |
135 | 136 |
| |
136 | 137 |
| |
137 | 138 |
| |
138 | 139 |
| |
139 | 140 |
| |
140 | 141 |
| |
141 | 142 |
| |
| 143 | + | |
| 144 | + | |
| 145 | + | |
142 | 146 |
| |
| 147 | + | |
143 | 148 |
| |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
144 | 162 |
| |
145 | 163 |
| |
146 | 164 |
| |
| |||
295 | 313 |
| |
296 | 314 |
| |
297 | 315 |
| |
298 |
| - | |
| 316 | + | |
299 | 317 |
| |
300 | 318 |
| |
301 |
| - | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
302 | 322 |
| |
303 | 323 |
| |
304 | 324 |
| |
| |||
361 | 381 |
| |
362 | 382 |
| |
363 | 383 |
| |
364 |
| - | |
365 |
| - | |
| 384 | + | |
366 | 385 |
| |
367 | 386 |
| |
368 | 387 |
| |
| |||
381 | 400 |
| |
382 | 401 |
| |
383 | 402 |
| |
384 |
| - | |
385 |
| - | |
386 |
| - | |
| 403 | + | |
387 | 404 |
| |
388 | 405 |
| |
389 | 406 |
| |
| |||
392 | 409 |
| |
393 | 410 |
| |
394 | 411 |
| |
395 |
| - | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
396 | 419 |
| |
397 | 420 |
| |
| 421 | + | |
| 422 | + | |
| 423 | + | |
398 | 424 |
| |
399 | 425 |
| |
400 | 426 |
| |
| |||
472 | 498 |
| |
473 | 499 |
| |
474 | 500 |
| |
475 |
| - | |
476 |
| - | |
477 | 501 |
| |
478 | 502 |
| |
479 | 503 |
| |
480 | 504 |
| |
481 | 505 |
| |
482 |
| - | |
| 506 | + | |
483 | 507 |
| |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
484 | 517 |
| |
485 | 518 |
| |
486 | 519 |
| |
| 520 | + | |
| 521 | + | |
487 | 522 |
| |
488 | 523 |
| |
489 | 524 |
| |
|
Lines changed: 6 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
15 | 21 |
| |
16 | 22 |
| |
17 | 23 |
| |
| |||
29 | 35 |
| |
30 | 36 |
| |
31 | 37 |
| |
32 |
| - | |
33 |
| - | |
34 |
| - | |
35 |
| - | |
36 | 38 |
| |
37 | 39 |
| |
38 | 40 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
| 6 | + | |
6 | 7 |
| |
7 | 8 |
| |
8 | 9 |
| |
9 | 10 |
| |
10 | 11 |
| |
11 | 12 |
| |
12 |
| - | |
13 | 13 |
| |
14 | 14 |
| |
15 | 15 |
| |
|
0 commit comments
Comments
(0)