- Notifications
You must be signed in to change notification settings - Fork5
Commit0f2c089
committed
Fix commit timestamp initialization
This module needs explicit initialization in order to replay WAL recordsin recovery, but we had broken this recently following changes to makeother (stranger) scenarios work correctly. To fix, rework theinitialization sequence so that it always takes place before WAL replaycommences for both master and standby.I could have gone for a more localized fix that just added a "startup"call for the master server, but it seemed better to restructure theexisting callers as well so that the whole thing made more sense. As adrawback, there is more control logic in xlog.c now than previously, butdoing otherwise meant passing down the ControlFile flag, which seemeduglier as a whole.This also meant adding a check to not re-execute ActivateCommitTs if ithad already been called.Reported by Fujii Masao.Backpatch to 9.5.1 parent0fc7c4a commit0f2c089
File tree
3 files changed
+40
-23
lines changed- src
- backend/access/transam
- include/access
3 files changed
+40
-23
lines changedLines changed: 27 additions & 12 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
545 | 545 |
| |
546 | 546 |
| |
547 | 547 |
| |
548 |
| - | |
549 |
| - | |
550 |
| - | |
551 | 548 |
| |
552 | 549 |
| |
553 |
| - | |
| 550 | + | |
554 | 551 |
| |
555 |
| - | |
556 |
| - | |
557 |
| - | |
558 |
| - | |
559 |
| - | |
560 |
| - | |
| 552 | + | |
561 | 553 |
| |
562 | 554 |
| |
563 | 555 |
| |
| |||
570 | 562 |
| |
571 | 563 |
| |
572 | 564 |
| |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
573 | 571 |
| |
574 | 572 |
| |
575 | 573 |
| |
| 574 | + | |
| 575 | + | |
576 | 576 |
| |
577 | 577 |
| |
578 | 578 |
| |
| |||
591 | 591 |
| |
592 | 592 |
| |
593 | 593 |
| |
| 594 | + | |
| 595 | + | |
| 596 | + | |
594 | 597 |
| |
595 | 598 |
| |
596 | 599 |
| |
| |||
620 | 623 |
| |
621 | 624 |
| |
622 | 625 |
| |
623 |
| - | |
624 |
| - | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
625 | 640 |
| |
626 | 641 |
| |
627 | 642 |
| |
|
Lines changed: 12 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6338 | 6338 |
| |
6339 | 6339 |
| |
6340 | 6340 |
| |
| 6341 | + | |
| 6342 | + | |
| 6343 | + | |
| 6344 | + | |
| 6345 | + | |
| 6346 | + | |
| 6347 | + | |
| 6348 | + | |
6341 | 6349 |
| |
6342 | 6350 |
| |
6343 | 6351 |
| |
| |||
6565 | 6573 |
| |
6566 | 6574 |
| |
6567 | 6575 |
| |
6568 |
| - | |
6569 |
| - | |
| 6576 | + | |
| 6577 | + | |
6570 | 6578 |
| |
6571 |
| - | |
6572 |
| - | |
6573 |
| - | |
6574 |
| - | |
6575 | 6579 |
| |
6576 | 6580 |
| |
6577 |
| - | |
6578 | 6581 |
| |
6579 | 6582 |
| |
6580 | 6583 |
| |
| |||
7337 | 7340 |
| |
7338 | 7341 |
| |
7339 | 7342 |
| |
7340 |
| - | |
7341 |
| - | |
| 7343 | + | |
| 7344 | + | |
7342 | 7345 |
| |
7343 | 7346 |
| |
7344 | 7347 |
| |
7345 | 7348 |
| |
7346 |
| - | |
7347 | 7349 |
| |
7348 | 7350 |
| |
7349 | 7351 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
34 | 34 |
| |
35 | 35 |
| |
36 | 36 |
| |
37 |
| - | |
| 37 | + | |
38 | 38 |
| |
39 | 39 |
| |
40 | 40 |
| |
|
0 commit comments
Comments
(0)