forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit7e48b77
committed
Fix some serious bugs in archive recovery, now that bgwriter is active
during it:When bgwriter is active, the startup process can't perform mdsync() correctlybecause it won't see the fsync requests accumulated in bgwriter's privatependingOpsTable. Therefore make bgwriter responsible for the end-of-recoverycheckpoint as well, when it's active.When bgwriter is active (= archive recovery), the startup process must notaccumulate fsync requests to its own pendingOpsTable, since bgwriter won'tsee them there when it performs restartpoints. Make startup process drop itspendingOpsTable when bgwriter is launched to avoid that.Update minimum recovery point one last time when leaving archive recovery.It won't be updated by the end-of-recovery checkpoint because XLogFlush()sees us as out of recovery already.This fixes bug #4879 reported by Fujii Masao.1 parente6b8f47 commit7e48b77
File tree
5 files changed
+100
-38
lines changed- src
- backend
- access/transam
- postmaster
- storage/smgr
- include
- access
- storage
5 files changed
+100
-38
lines changedLines changed: 68 additions & 33 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| |||
4912 | 4912 |
| |
4913 | 4913 |
| |
4914 | 4914 |
| |
| 4915 | + | |
4915 | 4916 |
| |
4916 | 4917 |
| |
4917 | 4918 |
| |
4918 | 4919 |
| |
4919 | 4920 |
| |
4920 | 4921 |
| |
| 4922 | + | |
| 4923 | + | |
| 4924 | + | |
| 4925 | + | |
| 4926 | + | |
4921 | 4927 |
| |
4922 | 4928 |
| |
4923 | 4929 |
| |
| |||
5156 | 5162 |
| |
5157 | 5163 |
| |
5158 | 5164 |
| |
| 5165 | + | |
5159 | 5166 |
| |
5160 | 5167 |
| |
5161 | 5168 |
| |
| |||
5472 | 5479 |
| |
5473 | 5480 |
| |
5474 | 5481 |
| |
| 5482 | + | |
| 5483 | + | |
5475 | 5484 |
| |
| 5485 | + | |
| 5486 | + | |
5476 | 5487 |
| |
5477 | 5488 |
| |
5478 | 5489 |
| |
| |||
5709 | 5720 |
| |
5710 | 5721 |
| |
5711 | 5722 |
| |
5712 |
| - | |
5713 |
| - | |
5714 |
| - | |
5715 |
| - | |
5716 |
| - | |
5717 |
| - | |
5718 | 5723 |
| |
5719 | 5724 |
| |
5720 | 5725 |
| |
| |||
5743 | 5748 |
| |
5744 | 5749 |
| |
5745 | 5750 |
| |
5746 |
| - | |
| 5751 | + | |
| 5752 | + | |
| 5753 | + | |
| 5754 | + | |
| 5755 | + | |
| 5756 | + | |
5747 | 5757 |
| |
5748 | 5758 |
| |
5749 | 5759 |
| |
| |||
5806 | 5816 |
| |
5807 | 5817 |
| |
5808 | 5818 |
| |
5809 |
| - | |
| 5819 | + | |
5810 | 5820 |
| |
5811 | 5821 |
| |
5812 | 5822 |
| |
| |||
6123 | 6133 |
| |
6124 | 6134 |
| |
6125 | 6135 |
| |
6126 |
| - | |
| 6136 | + | |
6127 | 6137 |
| |
6128 |
| - | |
| 6138 | + | |
6129 | 6139 |
| |
6130 | 6140 |
| |
6131 | 6141 |
| |
| 6142 | + | |
6132 | 6143 |
| |
6133 | 6144 |
| |
6134 | 6145 |
| |
| |||
6190 | 6201 |
| |
6191 | 6202 |
| |
6192 | 6203 |
| |
| 6204 | + | |
6193 | 6205 |
| |
6194 | 6206 |
| |
6195 | 6207 |
| |
6196 |
| - | |
| 6208 | + | |
| 6209 | + | |
6197 | 6210 |
| |
6198 | 6211 |
| |
6199 | 6212 |
| |
| |||
6202 | 6215 |
| |
6203 | 6216 |
| |
6204 | 6217 |
| |
6205 |
| - | |
| 6218 | + | |
6206 | 6219 |
| |
6207 | 6220 |
| |
6208 | 6221 |
| |
| |||
6212 | 6225 |
| |
6213 | 6226 |
| |
6214 | 6227 |
| |
| 6228 | + | |
6215 | 6229 |
| |
6216 |
| - | |
6217 |
| - | |
6218 |
| - | |
| 6230 | + | |
| 6231 | + | |
| 6232 | + | |
| 6233 | + | |
| 6234 | + | |
| 6235 | + | |
| 6236 | + | |
| 6237 | + | |
6219 | 6238 |
| |
6220 | 6239 |
| |
6221 |
| - | |
6222 |
| - | |
6223 |
| - | |
6224 |
| - | |
6225 |
| - | |
| 6240 | + | |
| 6241 | + | |
| 6242 | + | |
| 6243 | + | |
6226 | 6244 |
| |
6227 |
| - | |
| 6245 | + | |
6228 | 6246 |
| |
6229 |
| - | |
| 6247 | + | |
| 6248 | + | |
| 6249 | + | |
6230 | 6250 |
| |
6231 | 6251 |
| |
6232 |
| - | |
6233 |
| - | |
6234 |
| - | |
6235 |
| - | |
6236 |
| - | |
| 6252 | + | |
| 6253 | + | |
| 6254 | + | |
| 6255 | + | |
| 6256 | + | |
6237 | 6257 |
| |
6238 |
| - | |
6239 |
| - | |
6240 |
| - | |
6241 |
| - | |
| 6258 | + | |
| 6259 | + | |
| 6260 | + | |
| 6261 | + | |
| 6262 | + | |
| 6263 | + | |
| 6264 | + | |
6242 | 6265 |
| |
6243 | 6266 |
| |
| 6267 | + | |
| 6268 | + | |
| 6269 | + | |
| 6270 | + | |
| 6271 | + | |
| 6272 | + | |
| 6273 | + | |
| 6274 | + | |
6244 | 6275 |
| |
6245 | 6276 |
| |
6246 | 6277 |
| |
| |||
6298 | 6329 |
| |
6299 | 6330 |
| |
6300 | 6331 |
| |
6301 |
| - | |
| 6332 | + | |
| 6333 | + | |
6302 | 6334 |
| |
6303 | 6335 |
| |
6304 | 6336 |
| |
| |||
6542 | 6574 |
| |
6543 | 6575 |
| |
6544 | 6576 |
| |
| 6577 | + | |
| 6578 | + | |
| 6579 | + | |
6545 | 6580 |
| |
6546 | 6581 |
| |
6547 | 6582 |
| |
|
Lines changed: 11 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
37 | 37 |
| |
38 | 38 |
| |
39 | 39 |
| |
40 |
| - | |
| 40 | + | |
41 | 41 |
| |
42 | 42 |
| |
43 | 43 |
| |
| |||
448 | 448 |
| |
449 | 449 |
| |
450 | 450 |
| |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
451 | 458 |
| |
452 | 459 |
| |
453 | 460 |
| |
| |||
895 | 902 |
| |
896 | 903 |
| |
897 | 904 |
| |
| 905 | + | |
898 | 906 |
| |
899 | 907 |
| |
900 | 908 |
| |
901 |
| - | |
| 909 | + | |
| 910 | + | |
902 | 911 |
| |
903 | 912 |
| |
904 | 913 |
| |
|
Lines changed: 16 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
203 | 203 |
| |
204 | 204 |
| |
205 | 205 |
| |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
206 | 221 |
| |
207 | 222 |
| |
208 | 223 |
| |
|
Lines changed: 3 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6 | 6 |
| |
7 | 7 |
| |
8 | 8 |
| |
9 |
| - | |
| 9 | + | |
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
| |||
166 | 166 |
| |
167 | 167 |
| |
168 | 168 |
| |
| 169 | + | |
| 170 | + | |
169 | 171 |
| |
170 | 172 |
| |
171 | 173 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| |||
109 | 109 |
| |
110 | 110 |
| |
111 | 111 |
| |
| 112 | + | |
112 | 113 |
| |
113 | 114 |
| |
114 | 115 |
| |
|
0 commit comments
Comments
(0)