forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit8049839
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 parentccf2b00 commit8049839
2 files changed
+24
-5
lines changedLines changed: 23 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5520 | 5520 |
| |
5521 | 5521 |
| |
5522 | 5522 |
| |
| 5523 | + | |
5523 | 5524 |
| |
5524 | 5525 |
| |
5525 | 5526 |
| |
| |||
5531 | 5532 |
| |
5532 | 5533 |
| |
5533 | 5534 |
| |
| 5535 | + | |
| 5536 | + | |
| 5537 | + | |
| 5538 | + | |
| 5539 | + | |
| 5540 | + | |
| 5541 | + | |
| 5542 | + | |
| 5543 | + | |
5534 | 5544 |
| |
5535 | 5545 |
| |
5536 | 5546 |
| |
5537 | 5547 |
| |
5538 | 5548 |
| |
5539 | 5549 |
| |
5540 | 5550 |
| |
| 5551 | + | |
| 5552 | + | |
| 5553 | + | |
| 5554 | + | |
| 5555 | + | |
| 5556 | + | |
| 5557 | + | |
| 5558 | + | |
| 5559 | + | |
5541 | 5560 |
| |
5542 | 5561 |
| |
5543 | 5562 |
| |
| |||
5560 | 5579 |
| |
5561 | 5580 |
| |
5562 | 5581 |
| |
5563 |
| - | |
| 5582 | + | |
5564 | 5583 |
| |
5565 | 5584 |
| |
5566 | 5585 |
| |
| |||
5581 | 5600 |
| |
5582 | 5601 |
| |
5583 | 5602 |
| |
5584 |
| - | |
| 5603 | + | |
5585 | 5604 |
| |
5586 | 5605 |
| |
5587 | 5606 |
| |
5588 |
| - | |
| 5607 | + | |
| 5608 | + | |
5589 | 5609 |
| |
5590 | 5610 |
| |
5591 | 5611 |
| |
|
Lines changed: 1 addition & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
144 | 144 |
| |
145 | 145 |
| |
146 | 146 |
| |
147 |
| - | |
148 |
| - | |
| 147 | + | |
149 | 148 |
| |
150 | 149 |
| |
151 | 150 |
| |
|
0 commit comments
Comments
(0)