Commit ead9e51
committed
Advance old-segment horizon properly after slot invalidation
When some slots are invalidated due to the max_slot_wal_keep_size limit,
the old segment horizon should move forward to stay within the limit.
However, in commit c655077 we forgot to call KeepLogSeg again to
recompute the horizon after invalidating replication slots. In cases
where other slots remained, the limits would be recomputed eventually
for other reasons, but if all slots were invalidated, the limits would
not move at all afterwards. Repair.
Backpatch to 13 where the feature was introduced.
Author: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Reported-by: Marcin Krupowicz <mk@071.ovh>
Discussion: https://postgr.es/m/17103-004130e8f27782c9@postgresql.org1 parent 46111fb commit ead9e51
File tree
4 files changed
+74
-12
lines changed- src
- backend
- access/transam
- replication
- include/replication
- test/recovery/t
4 files changed
+74
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9300 | 9300 | | |
9301 | 9301 | | |
9302 | 9302 | | |
9303 | | - | |
| 9303 | + | |
| 9304 | + | |
| 9305 | + | |
| 9306 | + | |
| 9307 | + | |
| 9308 | + | |
| 9309 | + | |
| 9310 | + | |
| 9311 | + | |
9304 | 9312 | | |
9305 | 9313 | | |
9306 | 9314 | | |
| |||
9640 | 9648 | | |
9641 | 9649 | | |
9642 | 9650 | | |
9643 | | - | |
| 9651 | + | |
| 9652 | + | |
| 9653 | + | |
| 9654 | + | |
| 9655 | + | |
| 9656 | + | |
| 9657 | + | |
| 9658 | + | |
| 9659 | + | |
9644 | 9660 | | |
9645 | 9661 | | |
9646 | 9662 | | |
| |||
9809 | 9825 | | |
9810 | 9826 | | |
9811 | 9827 | | |
| 9828 | + | |
| 9829 | + | |
| 9830 | + | |
| 9831 | + | |
| 9832 | + | |
| 9833 | + | |
9812 | 9834 | | |
9813 | 9835 | | |
9814 | 9836 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1143 | 1143 | | |
1144 | 1144 | | |
1145 | 1145 | | |
| 1146 | + | |
| 1147 | + | |
1146 | 1148 | | |
1147 | 1149 | | |
1148 | 1150 | | |
1149 | 1151 | | |
1150 | | - | |
| 1152 | + | |
| 1153 | + | |
1151 | 1154 | | |
1152 | 1155 | | |
1153 | 1156 | | |
| |||
1204 | 1207 | | |
1205 | 1208 | | |
1206 | 1209 | | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
1207 | 1213 | | |
1208 | 1214 | | |
1209 | 1215 | | |
| |||
1291 | 1297 | | |
1292 | 1298 | | |
1293 | 1299 | | |
| 1300 | + | |
| 1301 | + | |
1294 | 1302 | | |
1295 | 1303 | | |
1296 | | - | |
| 1304 | + | |
1297 | 1305 | | |
1298 | 1306 | | |
1299 | 1307 | | |
| 1308 | + | |
1300 | 1309 | | |
1301 | 1310 | | |
1302 | 1311 | | |
| |||
1309 | 1318 | | |
1310 | 1319 | | |
1311 | 1320 | | |
1312 | | - | |
| 1321 | + | |
1313 | 1322 | | |
1314 | 1323 | | |
1315 | 1324 | | |
1316 | 1325 | | |
1317 | 1326 | | |
1318 | 1327 | | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
1319 | 1339 | | |
1320 | 1340 | | |
1321 | 1341 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
216 | | - | |
| 216 | + | |
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
179 | | - | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
180 | 185 | | |
181 | 186 | | |
182 | 187 | | |
| |||
185 | 190 | | |
186 | 191 | | |
187 | 192 | | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
192 | 198 | | |
193 | 199 | | |
194 | 200 | | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
195 | 215 | | |
196 | 216 | | |
197 | 217 | | |
| |||
0 commit comments