- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit6b61955
committed
Code review for transaction commit timestamps
There are three main changes here:1. No longer cause a start failure in a standby if the feature isdisabled in postgresql.conf but enabled in the master. This reverts onepart of commit4f3924d; what we keep is the ability of the standbyto activate/deactivate the module (which includes creating and removingsegments as appropriate) during replay of such actions in the master.2. Replay WAL records affecting commitTS even if the feature isdisabled. This means the standby will always have the same state as themaster after replay.3. Have COMMIT PREPARE record the transaction commit time as well. Wewere previously only applying it in the normal transaction commit path.Author: Petr JelínekDiscussion:http://www.postgresql.org/message-id/CAHGQGwHereDzzzmfxEBYcVQu3oZv6vZcgu1TPeERWbDc+gQ06g@mail.gmail.comDiscussion:http://www.postgresql.org/message-id/CAHGQGwFuzfO4JscM9LCAmCDCxp_MfLvN4QdB+xWsS-FijbjTYQ@mail.gmail.comAdditionally, I cleaned up nearby code related to replication origins,which I found a bit hard to follow, and fixed a couple of typos.Backpatch to 9.5, where this code was introduced.Per bug reports from Fujii Masao and subsequent discussion.1 parentb631a46 commit6b61955
File tree
6 files changed
+90
-48
lines changed- src
- backend/access
- rmgrdesc
- transam
- include/access
6 files changed
+90
-48
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
111 | 111 |
| |
112 | 112 |
| |
113 | 113 |
| |
114 |
| - | |
| 114 | + | |
115 | 115 |
| |
116 | 116 |
| |
117 | 117 |
| |
|
Lines changed: 20 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
122 | 122 |
| |
123 | 123 |
| |
124 | 124 |
| |
125 |
| - | |
126 |
| - | |
127 |
| - | |
128 |
| - | |
129 |
| - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
130 | 135 |
| |
131 | 136 |
| |
132 | 137 |
| |
133 | 138 |
| |
134 |
| - | |
| 139 | + | |
| 140 | + | |
135 | 141 |
| |
136 | 142 |
| |
137 | 143 |
| |
138 | 144 |
| |
139 | 145 |
| |
140 |
| - | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
141 | 151 |
| |
142 | 152 |
| |
143 | 153 |
| |
144 | 154 |
| |
145 | 155 |
| |
146 | 156 |
| |
147 |
| - | |
| 157 | + | |
148 | 158 |
| |
149 | 159 |
| |
150 | 160 |
| |
| |||
906 | 916 |
| |
907 | 917 |
| |
908 | 918 |
| |
909 |
| - | |
| 919 | + | |
| 920 | + | |
910 | 921 |
| |
911 | 922 |
| |
912 | 923 |
| |
|
Lines changed: 37 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
41 | 41 |
| |
42 | 42 |
| |
43 | 43 |
| |
| 44 | + | |
44 | 45 |
| |
45 | 46 |
| |
46 | 47 |
| |
| |||
56 | 57 |
| |
57 | 58 |
| |
58 | 59 |
| |
59 |
| - | |
| 60 | + | |
60 | 61 |
| |
| 62 | + | |
61 | 63 |
| |
62 | 64 |
| |
63 | 65 |
| |
| |||
2070 | 2072 |
| |
2071 | 2073 |
| |
2072 | 2074 |
| |
2073 |
| - | |
2074 |
| - | |
| 2075 | + | |
| 2076 | + | |
| 2077 | + | |
2075 | 2078 |
| |
2076 | 2079 |
| |
2077 | 2080 |
| |
| |||
2087 | 2090 |
| |
2088 | 2091 |
| |
2089 | 2092 |
| |
| 2093 | + | |
| 2094 | + | |
| 2095 | + | |
| 2096 | + | |
| 2097 | + | |
| 2098 | + | |
| 2099 | + | |
| 2100 | + | |
| 2101 | + | |
2090 | 2102 |
| |
2091 | 2103 |
| |
2092 | 2104 |
| |
2093 | 2105 |
| |
2094 | 2106 |
| |
2095 | 2107 |
| |
2096 | 2108 |
| |
2097 |
| - | |
| 2109 | + | |
2098 | 2110 |
| |
2099 | 2111 |
| |
2100 | 2112 |
| |
2101 | 2113 |
| |
2102 | 2114 |
| |
| 2115 | + | |
| 2116 | + | |
| 2117 | + | |
| 2118 | + | |
| 2119 | + | |
| 2120 | + | |
| 2121 | + | |
| 2122 | + | |
| 2123 | + | |
| 2124 | + | |
| 2125 | + | |
| 2126 | + | |
| 2127 | + | |
| 2128 | + | |
| 2129 | + | |
| 2130 | + | |
| 2131 | + | |
| 2132 | + | |
| 2133 | + | |
| 2134 | + | |
| 2135 | + | |
2103 | 2136 |
| |
2104 | 2137 |
| |
2105 | 2138 |
| |
|
Lines changed: 29 additions & 16 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
42 | 42 |
| |
43 | 43 |
| |
44 | 44 |
| |
45 |
| - | |
46 |
| - | |
47 | 45 |
| |
| 46 | + | |
| 47 | + | |
48 | 48 |
| |
49 | 49 |
| |
50 | 50 |
| |
| |||
1119 | 1119 |
| |
1120 | 1120 |
| |
1121 | 1121 |
| |
| 1122 | + | |
| 1123 | + | |
1122 | 1124 |
| |
1123 | 1125 |
| |
1124 | 1126 |
| |
| |||
1172 | 1174 |
| |
1173 | 1175 |
| |
1174 | 1176 |
| |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
1175 | 1186 |
| |
1176 | 1187 |
| |
1177 | 1188 |
| |
| |||
1206 | 1217 |
| |
1207 | 1218 |
| |
1208 | 1219 |
| |
1209 |
| - | |
1210 |
| - | |
1211 |
| - | |
1212 |
| - | |
1213 |
| - | |
1214 |
| - | |
1215 |
| - | |
1216 |
| - | |
1217 |
| - | |
| 1220 | + | |
| 1221 | + | |
1218 | 1222 |
| |
1219 | 1223 |
| |
1220 | 1224 |
| |
1221 | 1225 |
| |
1222 |
| - | |
1223 |
| - | |
1224 |
| - | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
1225 | 1233 |
| |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
1226 | 1238 |
| |
1227 | 1239 |
| |
1228 |
| - | |
| 1240 | + | |
| 1241 | + | |
1229 | 1242 |
| |
1230 | 1243 |
| |
1231 | 1244 |
| |
| |||
5321 | 5334 |
| |
5322 | 5335 |
| |
5323 | 5336 |
| |
5324 |
| - | |
| 5337 | + | |
5325 | 5338 |
| |
5326 | 5339 |
| |
5327 | 5340 |
| |
|
Lines changed: 0 additions & 16 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5826 | 5826 |
| |
5827 | 5827 |
| |
5828 | 5828 |
| |
5829 |
| - | |
5830 |
| - | |
5831 |
| - | |
5832 |
| - | |
5833 |
| - | |
5834 |
| - | |
5835 |
| - | |
5836 |
| - | |
5837 |
| - | |
5838 |
| - | |
5839 |
| - | |
5840 |
| - | |
5841 |
| - | |
5842 | 5829 |
| |
5843 | 5830 |
| |
5844 | 5831 |
| |
| |||
5885 | 5872 |
| |
5886 | 5873 |
| |
5887 | 5874 |
| |
5888 |
| - | |
5889 |
| - | |
5890 |
| - | |
5891 | 5875 |
| |
5892 | 5876 |
| |
5893 | 5877 |
| |
|
Lines changed: 3 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
24 | 24 |
| |
25 | 25 |
| |
26 | 26 |
| |
27 |
| - | |
| 27 | + | |
| 28 | + | |
28 | 29 |
| |
29 | 30 |
| |
30 | 31 |
| |
| |||
67 | 68 |
| |
68 | 69 |
| |
69 | 70 |
| |
70 |
| - | |
| 71 | + |
0 commit comments
Comments
(0)