forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit1d25757
committed
Optionally prefetch referenced data in recovery.
Introduce a new GUC recovery_prefetch, disabled by default. Whenenabled, look ahead in the WAL and try to initiate asynchronous readingof referenced data blocks that are not yet cached in our buffer pool.For now, this is done with posix_fadvise(), which has several caveats.Better mechanisms will follow in later work on the I/O subsystem.The GUC maintenance_io_concurrency is used to limit the number ofconcurrent I/Os we allow ourselves to initiate, based on pessimisticheuristics used to infer that I/Os have begun and completed.The GUC wal_decode_buffer_size is used to limit the maximum distance weare prepared to read ahead in the WAL to find uncached blocks.Reviewed-by: Alvaro Herrera <alvherre@2ndquadrant.com> (parts)Reviewed-by: Andres Freund <andres@anarazel.de> (parts)Reviewed-by: Tomas Vondra <tomas.vondra@2ndquadrant.com> (parts)Tested-by: Tomas Vondra <tomas.vondra@2ndquadrant.com>Tested-by: Jakub Wartak <Jakub.Wartak@tomtom.com>Tested-by: Dmitry Dolgov <9erthalion6@gmail.com>Tested-by: Sait Talha Nisanci <Sait.Nisanci@microsoft.com>Discussion:https://postgr.es/m/CA%2BhUKGJ4VJN8ttxScUFM8dOKX0BrBiboo5uz1cq%3DAovOddfHpA%40mail.gmail.com1 parentf003d9f commit1d25757
File tree
23 files changed
+1502
-19
lines changed- doc/src/sgml
- src
- backend
- access/transam
- catalog
- postmaster
- storage
- freespace
- ipc
- utils/misc
- include
- access
- catalog
- utils
- test/regress/expected
- tools/pgindent
23 files changed
+1502
-19
lines changedLines changed: 83 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3565 | 3565 |
| |
3566 | 3566 |
| |
3567 | 3567 |
| |
| 3568 | + | |
| 3569 | + | |
| 3570 | + | |
| 3571 | + | |
| 3572 | + | |
| 3573 | + | |
| 3574 | + | |
| 3575 | + | |
| 3576 | + | |
| 3577 | + | |
| 3578 | + | |
| 3579 | + | |
| 3580 | + | |
| 3581 | + | |
| 3582 | + | |
| 3583 | + | |
| 3584 | + | |
| 3585 | + | |
| 3586 | + | |
| 3587 | + | |
| 3588 | + | |
| 3589 | + | |
| 3590 | + | |
| 3591 | + | |
| 3592 | + | |
| 3593 | + | |
| 3594 | + | |
| 3595 | + | |
| 3596 | + | |
| 3597 | + | |
| 3598 | + | |
| 3599 | + | |
| 3600 | + | |
| 3601 | + | |
| 3602 | + | |
| 3603 | + | |
| 3604 | + | |
| 3605 | + | |
| 3606 | + | |
| 3607 | + | |
| 3608 | + | |
| 3609 | + | |
| 3610 | + | |
| 3611 | + | |
| 3612 | + | |
| 3613 | + | |
| 3614 | + | |
| 3615 | + | |
| 3616 | + | |
| 3617 | + | |
| 3618 | + | |
| 3619 | + | |
| 3620 | + | |
| 3621 | + | |
| 3622 | + | |
| 3623 | + | |
| 3624 | + | |
| 3625 | + | |
| 3626 | + | |
| 3627 | + | |
| 3628 | + | |
| 3629 | + | |
| 3630 | + | |
| 3631 | + | |
| 3632 | + | |
| 3633 | + | |
| 3634 | + | |
| 3635 | + | |
| 3636 | + | |
| 3637 | + | |
| 3638 | + | |
| 3639 | + | |
| 3640 | + | |
| 3641 | + | |
| 3642 | + | |
| 3643 | + | |
| 3644 | + | |
| 3645 | + | |
| 3646 | + | |
| 3647 | + | |
| 3648 | + | |
| 3649 | + | |
| 3650 | + | |
3568 | 3651 |
| |
3569 | 3652 |
| |
3570 | 3653 |
| |
|
Lines changed: 84 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
337 | 337 |
| |
338 | 338 |
| |
339 | 339 |
| |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
340 | 347 |
| |
341 | 348 |
| |
342 | 349 |
| |
| |||
2917 | 2924 |
| |
2918 | 2925 |
| |
2919 | 2926 |
| |
| 2927 | + | |
| 2928 | + | |
| 2929 | + | |
| 2930 | + | |
| 2931 | + | |
| 2932 | + | |
| 2933 | + | |
| 2934 | + | |
| 2935 | + | |
| 2936 | + | |
| 2937 | + | |
| 2938 | + | |
| 2939 | + | |
| 2940 | + | |
| 2941 | + | |
| 2942 | + | |
| 2943 | + | |
| 2944 | + | |
| 2945 | + | |
| 2946 | + | |
| 2947 | + | |
| 2948 | + | |
| 2949 | + | |
| 2950 | + | |
| 2951 | + | |
| 2952 | + | |
| 2953 | + | |
| 2954 | + | |
| 2955 | + | |
| 2956 | + | |
| 2957 | + | |
| 2958 | + | |
| 2959 | + | |
| 2960 | + | |
| 2961 | + | |
| 2962 | + | |
| 2963 | + | |
| 2964 | + | |
| 2965 | + | |
| 2966 | + | |
| 2967 | + | |
| 2968 | + | |
| 2969 | + | |
| 2970 | + | |
| 2971 | + | |
| 2972 | + | |
| 2973 | + | |
| 2974 | + | |
| 2975 | + | |
| 2976 | + | |
| 2977 | + | |
| 2978 | + | |
| 2979 | + | |
| 2980 | + | |
| 2981 | + | |
| 2982 | + | |
| 2983 | + | |
| 2984 | + | |
| 2985 | + | |
| 2986 | + | |
| 2987 | + | |
| 2988 | + | |
| 2989 | + | |
| 2990 | + | |
| 2991 | + | |
| 2992 | + | |
| 2993 | + | |
| 2994 | + | |
| 2995 | + | |
| 2996 | + | |
| 2997 | + | |
| 2998 | + | |
2920 | 2999 |
| |
2921 | 3000 |
| |
2922 | 3001 |
| |
| |||
5049 | 5128 |
| |
5050 | 5129 |
| |
5051 | 5130 |
| |
5052 |
| - | |
5053 |
| - | |
| 5131 | + | |
| 5132 | + | |
| 5133 | + | |
| 5134 | + | |
| 5135 | + | |
5054 | 5136 |
| |
5055 | 5137 |
| |
5056 | 5138 |
| |
|
Lines changed: 17 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
803 | 803 |
| |
804 | 804 |
| |
805 | 805 |
| |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
806 | 823 |
| |
807 | 824 |
| |
808 | 825 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
31 | 31 |
| |
32 | 32 |
| |
33 | 33 |
| |
| 34 | + | |
34 | 35 |
| |
35 | 36 |
| |
36 | 37 |
| |
|
0 commit comments
Comments
(0)