Skip to content

Commit 813fde7

Browse files
committed
Standardize "read-ahead advice" terminology.
Commit 6654bb9 added macOS's equivalent of POSIX_FADV_WILLNEED, and changed some explicit references to posix_fadvise to use this more general name for the concept. Update some remaining references. Reviewed-by: Peter Eisentraut <peter@eisentraut.org> Discussion: https://postgr.es/m/0827edec-1317-4917-a186-035eb1e3241d%40eisentraut.org
1 parent 1c61fd8 commit 813fde7

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

src/backend/access/transam/xlogprefetcher.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1083,7 +1083,7 @@ check_recovery_prefetch(int *new_value, void **extra, GucSource source)
10831083
#ifndef USE_PREFETCH
10841084
if (*new_value == RECOVERY_PREFETCH_ON)
10851085
{
1086-
GUC_check_errdetail("\"recovery_prefetch\" is not supported on platforms that lack posix_fadvise().");
1086+
GUC_check_errdetail("\"recovery_prefetch\" is not supported on platforms that lack support for issuing read-ahead advice.");
10871087
return false;
10881088
}
10891089
#endif

src/backend/storage/aio/read_stream.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,17 @@
2424
* already. There is no benefit to looking ahead more than one block, so
2525
* distance is 1. This is the default initial assumption.
2626
*
27-
* B) I/O is necessary, but fadvise is undesirable because the access is
28-
* sequential, or impossible because direct I/O is enabled or the system
29-
* doesn't support fadvise. There is no benefit in looking ahead more than
27+
* B) I/O is necessary, but read-ahead advice is undesirable because the
28+
* access is sequential and we can rely on the kernel's read-ahead heuristics,
29+
* or impossible because direct I/O is enabled, or the system doesn't support
30+
* read-ahead advice. There is no benefit in looking ahead more than
3031
* io_combine_limit, because in this case the only goal is larger read system
3132
* calls. Looking further ahead would pin many buffers and perform
32-
* speculative work looking ahead for no benefit.
33+
* speculative work for no benefit.
3334
*
34-
* C) I/O is necessary, it appears random, and this system supports fadvise.
35-
* We'll look further ahead in order to reach the configured level of I/O
36-
* concurrency.
35+
* C) I/O is necessary, it appears to be random, and this system supports
36+
* read-ahead advice. We'll look further ahead in order to reach the
37+
* configured level of I/O concurrency.
3738
*
3839
* The distance increases rapidly and decays slowly, so that it moves towards
3940
* those levels as different I/O patterns are discovered. For example, a

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy