forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit61752af
committed
Provide recovery_init_sync_method=syncfs.
Since commit2ce439f we have opened every file in the data directoryand called fsync() at the start of crash recovery. This can be veryslow if there are many files, leading to field complaints of systemstaking minutes or even hours to begin crash recovery.Provide an alternative method, for Linux only, where we call syncfs() onevery possibly different filesystem under the data directory. This isequivalent, but avoids faulting in potentially many inodes frompotentially slow storage.The new mode comes with some caveats, described in the documentation, sothe default value for the new setting is "fsync", preserving the olderbehavior.Reported-by: Michael Brown <michael.brown@discourse.org>Reviewed-by: Fujii Masao <masao.fujii@oss.nttdata.com>Reviewed-by: Paul Guo <guopa@vmware.com>Reviewed-by: Bruce Momjian <bruce@momjian.us>Reviewed-by: Justin Pryzby <pryzby@telsasoft.com>Reviewed-by: David Steele <david@pgmasters.net>Discussion:https://postgr.es/m/11bc2bb7-ecb5-3ad0-b39f-df632734cd81%40discourse.orgDiscussion:https://postgr.es/m/CAEET0ZHGnbXmi8yF3ywsDZvb3m9CbdsGZgfTXscQ6agcbzcZAw%40mail.gmail.com1 parentb822ae1 commit61752af
File tree
9 files changed
+129
-2
lines changed- doc/src/sgml
- src
- backend
- storage/file
- utils/misc
- include
- storage
- tools/msvc
9 files changed
+129
-2
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
15409 | 15409 |
| |
15410 | 15410 |
| |
15411 | 15411 |
| |
15412 |
| - | |
| 15412 | + | |
15413 | 15413 |
| |
15414 | 15414 |
| |
15415 | 15415 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1701 | 1701 |
| |
1702 | 1702 |
| |
1703 | 1703 |
| |
| 1704 | + | |
1704 | 1705 |
| |
1705 | 1706 |
| |
1706 | 1707 |
| |
|
Lines changed: 35 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
9721 | 9721 |
| |
9722 | 9722 |
| |
9723 | 9723 |
| |
| 9724 | + | |
| 9725 | + | |
| 9726 | + | |
| 9727 | + | |
| 9728 | + | |
| 9729 | + | |
| 9730 | + | |
| 9731 | + | |
| 9732 | + | |
| 9733 | + | |
| 9734 | + | |
| 9735 | + | |
| 9736 | + | |
| 9737 | + | |
| 9738 | + | |
| 9739 | + | |
| 9740 | + | |
| 9741 | + | |
| 9742 | + | |
| 9743 | + | |
| 9744 | + | |
| 9745 | + | |
| 9746 | + | |
| 9747 | + | |
| 9748 | + | |
| 9749 | + | |
| 9750 | + | |
| 9751 | + | |
| 9752 | + | |
| 9753 | + | |
| 9754 | + | |
| 9755 | + | |
| 9756 | + | |
| 9757 | + | |
| 9758 | + | |
9724 | 9759 |
| |
9725 | 9760 |
| |
9726 | 9761 |
| |
|
Lines changed: 64 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
72 | 72 |
| |
73 | 73 |
| |
74 | 74 |
| |
| 75 | + | |
75 | 76 |
| |
76 | 77 |
| |
77 | 78 |
| |
| 79 | + | |
78 | 80 |
| |
79 | 81 |
| |
80 | 82 |
| |
| |||
158 | 160 |
| |
159 | 161 |
| |
160 | 162 |
| |
| 163 | + | |
| 164 | + | |
| 165 | + | |
161 | 166 |
| |
162 | 167 |
| |
163 | 168 |
| |
| |||
3265 | 3270 |
| |
3266 | 3271 |
| |
3267 | 3272 |
| |
| 3273 | + | |
| 3274 | + | |
| 3275 | + | |
| 3276 | + | |
| 3277 | + | |
| 3278 | + | |
| 3279 | + | |
| 3280 | + | |
| 3281 | + | |
| 3282 | + | |
| 3283 | + | |
| 3284 | + | |
| 3285 | + | |
| 3286 | + | |
| 3287 | + | |
| 3288 | + | |
| 3289 | + | |
| 3290 | + | |
| 3291 | + | |
| 3292 | + | |
| 3293 | + | |
3268 | 3294 |
| |
3269 | 3295 |
| |
3270 |
| - | |
| 3296 | + | |
| 3297 | + | |
3271 | 3298 |
| |
3272 | 3299 |
| |
3273 | 3300 |
| |
| |||
3319 | 3346 |
| |
3320 | 3347 |
| |
3321 | 3348 |
| |
| 3349 | + | |
| 3350 | + | |
| 3351 | + | |
| 3352 | + | |
| 3353 | + | |
| 3354 | + | |
| 3355 | + | |
| 3356 | + | |
| 3357 | + | |
| 3358 | + | |
| 3359 | + | |
| 3360 | + | |
| 3361 | + | |
| 3362 | + | |
| 3363 | + | |
| 3364 | + | |
| 3365 | + | |
| 3366 | + | |
| 3367 | + | |
| 3368 | + | |
| 3369 | + | |
| 3370 | + | |
| 3371 | + | |
| 3372 | + | |
| 3373 | + | |
| 3374 | + | |
| 3375 | + | |
| 3376 | + | |
| 3377 | + | |
| 3378 | + | |
| 3379 | + | |
| 3380 | + | |
| 3381 | + | |
| 3382 | + | |
| 3383 | + | |
| 3384 | + | |
3322 | 3385 |
| |
3323 | 3386 |
| |
3324 | 3387 |
| |
|
Lines changed: 17 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
488 | 488 |
| |
489 | 489 |
| |
490 | 490 |
| |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
491 | 499 |
| |
492 | 500 |
| |
493 | 501 |
| |
| |||
4871 | 4879 |
| |
4872 | 4880 |
| |
4873 | 4881 |
| |
| 4882 | + | |
| 4883 | + | |
| 4884 | + | |
| 4885 | + | |
| 4886 | + | |
| 4887 | + | |
| 4888 | + | |
| 4889 | + | |
| 4890 | + | |
4874 | 4891 |
| |
4875 | 4892 |
| |
4876 | 4893 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
761 | 761 |
| |
762 | 762 |
| |
763 | 763 |
| |
| 764 | + | |
764 | 765 |
| |
765 | 766 |
| |
766 | 767 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
590 | 590 |
| |
591 | 591 |
| |
592 | 592 |
| |
| 593 | + | |
| 594 | + | |
| 595 | + | |
593 | 596 |
| |
594 | 597 |
| |
595 | 598 |
| |
|
Lines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
45 | 45 |
| |
46 | 46 |
| |
47 | 47 |
| |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
48 | 53 |
| |
49 | 54 |
| |
50 | 55 |
| |
| |||
53 | 58 |
| |
54 | 59 |
| |
55 | 60 |
| |
| 61 | + | |
56 | 62 |
| |
57 | 63 |
| |
58 | 64 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
388 | 388 |
| |
389 | 389 |
| |
390 | 390 |
| |
| 391 | + | |
391 | 392 |
| |
392 | 393 |
| |
393 | 394 |
| |
|
0 commit comments
Comments
(0)