forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitf1f3bcb
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 parent82a83ec commitf1f3bcb
3 files changed
+54
-17
lines changedLines changed: 47 additions & 12 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
130 | 130 |
| |
131 | 131 |
| |
132 | 132 |
| |
133 |
| - | |
| 133 | + | |
| 134 | + | |
134 | 135 |
| |
135 | 136 |
| |
136 | 137 |
| |
137 | 138 |
| |
138 | 139 |
| |
139 | 140 |
| |
140 | 141 |
| |
| 142 | + | |
| 143 | + | |
| 144 | + | |
141 | 145 |
| |
| 146 | + | |
142 | 147 |
| |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
143 | 161 |
| |
144 | 162 |
| |
145 | 163 |
| |
| |||
294 | 312 |
| |
295 | 313 |
| |
296 | 314 |
| |
297 |
| - | |
| 315 | + | |
298 | 316 |
| |
299 | 317 |
| |
300 |
| - | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
301 | 321 |
| |
302 | 322 |
| |
303 | 323 |
| |
| |||
359 | 379 |
| |
360 | 380 |
| |
361 | 381 |
| |
362 |
| - | |
363 |
| - | |
| 382 | + | |
364 | 383 |
| |
365 | 384 |
| |
366 | 385 |
| |
| |||
372 | 391 |
| |
373 | 392 |
| |
374 | 393 |
| |
375 |
| - | |
376 |
| - | |
377 |
| - | |
| 394 | + | |
378 | 395 |
| |
379 | 396 |
| |
380 | 397 |
| |
| |||
383 | 400 |
| |
384 | 401 |
| |
385 | 402 |
| |
386 |
| - | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
387 | 410 |
| |
388 | 411 |
| |
| 412 | + | |
| 413 | + | |
| 414 | + | |
389 | 415 |
| |
390 | 416 |
| |
391 | 417 |
| |
| |||
463 | 489 |
| |
464 | 490 |
| |
465 | 491 |
| |
466 |
| - | |
467 |
| - | |
468 | 492 |
| |
469 | 493 |
| |
470 | 494 |
| |
471 | 495 |
| |
472 | 496 |
| |
473 |
| - | |
| 497 | + | |
474 | 498 |
| |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
475 | 508 |
| |
476 | 509 |
| |
477 | 510 |
| |
| 511 | + | |
| 512 | + | |
478 | 513 |
| |
479 | 514 |
| |
480 | 515 |
| |
|
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)