forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitb5ec22b
committed
Fix issue with WAL archiving in standby.
Previously, walreceiver always closed the currently-opened WAL segmentand created its archive notification file, after it finished writingthe current segment up and received any WAL data that should bewritten into the next segment. If walreceiver exited just beforeany WAL data in the next segment arrived at standby, it did notcreate the archive notification file of the current segmenteven though that's known completed. This behavior could causeWAL archiving of the segment to be delayed until subsequentrestartpoints or checkpoints created its notification file.To fix the issue, this commit changes walreceiver so that it createsan archive notification file of a current WAL segment immediatelyif that's known completed before receiving next WAL data.Back-patch to all supported branches.Reported-by: Kyotaro HoriguchiAuthor: Fujii MasaoReviewed-by: Kyotaro HoriguchiDiscussion:https://postgr.es/m/20200630.165503.1465894182551545886.horikyota.ntt@gmail.com1 parent52c300d commitb5ec22b
1 file changed
+62
-37
lines changedLines changed: 62 additions & 37 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
125 | 125 |
| |
126 | 126 |
| |
127 | 127 |
| |
| 128 | + | |
128 | 129 |
| |
129 | 130 |
| |
130 | 131 |
| |
| |||
883 | 884 |
| |
884 | 885 |
| |
885 | 886 |
| |
886 |
| - | |
887 |
| - | |
888 |
| - | |
889 |
| - | |
890 |
| - | |
891 |
| - | |
892 |
| - | |
893 |
| - | |
894 |
| - | |
895 |
| - | |
896 |
| - | |
897 |
| - | |
898 |
| - | |
899 |
| - | |
900 |
| - | |
901 |
| - | |
902 |
| - | |
903 |
| - | |
904 |
| - | |
905 |
| - | |
906 |
| - | |
907 |
| - | |
908 |
| - | |
909 |
| - | |
910 |
| - | |
911 |
| - | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
912 | 890 |
| |
913 |
| - | |
914 |
| - | |
915 |
| - | |
916 |
| - | |
917 |
| - | |
918 |
| - | |
919 |
| - | |
920 |
| - | |
921 |
| - | |
922 |
| - | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
923 | 894 |
| |
924 | 895 |
| |
925 | 896 |
| |
926 |
| - | |
927 | 897 |
| |
928 | 898 |
| |
929 | 899 |
| |
| |||
970 | 940 |
| |
971 | 941 |
| |
972 | 942 |
| |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
973 | 952 |
| |
974 | 953 |
| |
975 | 954 |
| |
| |||
1023 | 1002 |
| |
1024 | 1003 |
| |
1025 | 1004 |
| |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
1026 | 1051 |
| |
1027 | 1052 |
| |
1028 | 1053 |
| |
|
0 commit comments
Comments
(0)