- Notifications
You must be signed in to change notification settings - Fork4.9k
Commita2a718b
committed
Treat 2PC commit/abort the same as regular xacts in recovery.
There were several oversights in recovery code where COMMIT/ABORT PREPAREDrecords were ignored:* pg_last_xact_replay_timestamp() (wasn't updated for 2PC commits)* recovery_min_apply_delay (2PC commits were applied immediately)* recovery_target_xid (recovery would not stop if the XID used 2PC)The first of those was reported by Sergiy Zuban in bug #11032, analyzed byTom Lane and Andres Freund. The bug was always there, but was masked beforecommitd19bd29, because COMMIT PREPAREDalways created an extra regular transaction that was WAL-logged.Backpatch to all supported versions (older versions didn't have all thefeatures and therefore didn't have all of the above bugs).1 parent51fc613 commita2a718b
2 files changed
+29
-6
lines changedLines changed: 28 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4494 | 4494 |
| |
4495 | 4495 |
| |
4496 | 4496 |
| |
| 4497 | + | |
4497 | 4498 |
| |
4498 | 4499 |
| |
4499 | 4500 |
| |
| |||
4506 | 4507 |
| |
4507 | 4508 |
| |
4508 | 4509 |
| |
| 4510 | + | |
4509 | 4511 |
| |
4510 | 4512 |
| |
4511 | 4513 |
| |
4512 | 4514 |
| |
4513 | 4515 |
| |
4514 | 4516 |
| |
4515 | 4517 |
| |
| 4518 | + | |
| 4519 | + | |
| 4520 | + | |
| 4521 | + | |
| 4522 | + | |
| 4523 | + | |
| 4524 | + | |
| 4525 | + | |
| 4526 | + | |
4516 | 4527 |
| |
4517 | 4528 |
| |
4518 | 4529 |
| |
4519 | 4530 |
| |
4520 | 4531 |
| |
4521 | 4532 |
| |
4522 | 4533 |
| |
| 4534 | + | |
| 4535 | + | |
| 4536 | + | |
| 4537 | + | |
| 4538 | + | |
| 4539 | + | |
| 4540 | + | |
| 4541 | + | |
| 4542 | + | |
4523 | 4543 |
| |
4524 | 4544 |
| |
4525 | 4545 |
| |
4526 | 4546 |
| |
4527 | 4547 |
| |
4528 | 4548 |
| |
4529 | 4549 |
| |
| 4550 | + | |
4530 | 4551 |
| |
4531 | 4552 |
| |
4532 | 4553 |
| |
| |||
4555 | 4576 |
| |
4556 | 4577 |
| |
4557 | 4578 |
| |
4558 |
| - | |
| 4579 | + | |
4559 | 4580 |
| |
4560 | 4581 |
| |
4561 | 4582 |
| |
| |||
4590 | 4611 |
| |
4591 | 4612 |
| |
4592 | 4613 |
| |
4593 |
| - | |
| 4614 | + | |
4594 | 4615 |
| |
4595 | 4616 |
| |
4596 | 4617 |
| |
4597 |
| - | |
| 4618 | + | |
| 4619 | + | |
| 4620 | + | |
4598 | 4621 |
| |
4599 | 4622 |
| |
4600 | 4623 |
| |
| |||
4607 | 4630 |
| |
4608 | 4631 |
| |
4609 | 4632 |
| |
4610 |
| - | |
| 4633 | + | |
| 4634 | + | |
4611 | 4635 |
| |
4612 | 4636 |
| |
4613 | 4637 |
| |
|
Lines changed: 1 addition & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
180 | 180 |
| |
181 | 181 |
| |
182 | 182 |
| |
183 |
| - | |
184 |
| - | |
| 183 | + | |
185 | 184 |
| |
186 | 185 |
| |
187 | 186 |
| |
|
0 commit comments
Comments
(0)