forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitb981df4
committed
Prioritize history files when archiving
At the end of recovery for the post-promotion process, a new historyfile is created followed by the last partial segment of the previoustimeline. Based on the timing, the archiver would first try to archivethe last partial segment and then the history file. This can delay thedetection of a new timeline taken, particularly depending on the time ittakes to transfer the last partial segment as it delays the moment thehistory file of the new timeline gets archived. This can cause promotedstandbys to use the same timeline as one already taken depending on thecircumstances if multiple instances look at archives at the samelocation.This commit changes the order of archiving so as history files arearchived in priority over other file types, which reduces the likelihoodof the same timeline being taken (still not reducing the window tozero), and it makes the archiver behave more consistently with thestartup process doing its post-promotion business.Author: David SteeleReviewed-by: Michael Paquier, Kyotaro HoriguchiDiscussion:https://postgr.es/m/929068cf-69e1-bba2-9dc0-e05986aed471@pgmasters.netBackpatch-through: 9.51 parentbf491a9 commitb981df4
1 file changed
+46
-26
lines changedLines changed: 46 additions & 26 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
695 | 695 |
| |
696 | 696 |
| |
697 | 697 |
| |
698 |
| - | |
699 |
| - | |
700 |
| - | |
701 |
| - | |
702 |
| - | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
703 | 704 |
| |
704 | 705 |
| |
705 | 706 |
| |
| |||
711 | 712 |
| |
712 | 713 |
| |
713 | 714 |
| |
714 |
| - | |
715 | 715 |
| |
716 | 716 |
| |
717 | 717 |
| |
| 718 | + | |
718 | 719 |
| |
719 | 720 |
| |
720 | 721 |
| |
721 | 722 |
| |
722 | 723 |
| |
723 | 724 |
| |
724 | 725 |
| |
| 726 | + | |
| 727 | + | |
725 | 728 |
| |
726 |
| - | |
727 |
| - | |
728 |
| - | |
729 |
| - | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
730 | 758 |
| |
731 |
| - | |
732 |
| - | |
733 |
| - | |
734 |
| - | |
735 |
| - | |
736 |
| - | |
737 |
| - | |
738 |
| - | |
739 |
| - | |
740 |
| - | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
741 | 767 |
| |
742 | 768 |
| |
743 | 769 |
| |
744 | 770 |
| |
745 |
| - | |
746 |
| - | |
747 |
| - | |
748 |
| - | |
749 |
| - | |
750 |
| - | |
751 | 771 |
| |
752 | 772 |
| |
753 | 773 |
| |
|
0 commit comments
Comments
(0)