diff options
author | Thomas Munro <tmunro@postgresql.org> | 2024-09-04 10:12:20 +1200 |
---|---|---|
committer | Thomas Munro <tmunro@postgresql.org> | 2024-09-04 10:28:53 +1200 |
commit | 813fde73d4dd4fab1b7bde99ceaa47dd8437c21e (patch) | |
tree | 63437a026ced60f92a5e7db70785a65d5b885f92 | |
parent | 1c61fd8b527954f0ec522e5e60a11ce82628b681 (diff) | |
download | postgresql-813fde73d4dd4fab1b7bde99ceaa47dd8437c21e.tar.gz postgresql-813fde73d4dd4fab1b7bde99ceaa47dd8437c21e.zip |
Standardize "read-ahead advice" terminology.
Commit 6654bb920 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
-rw-r--r-- | src/backend/access/transam/xlogprefetcher.c | 2 | ||||
-rw-r--r-- | src/backend/storage/aio/read_stream.c | 15 |
2 files changed, 9 insertions, 8 deletions
diff --git a/src/backend/access/transam/xlogprefetcher.c b/src/backend/access/transam/xlogprefetcher.c index 3cb698d3bcb..3acaaea5b70 100644 --- a/src/backend/access/transam/xlogprefetcher.c +++ b/src/backend/access/transam/xlogprefetcher.c @@ -1083,7 +1083,7 @@ check_recovery_prefetch(int *new_value, void **extra, GucSource source) #ifndef USE_PREFETCH if (*new_value == RECOVERY_PREFETCH_ON) { - GUC_check_errdetail("\"recovery_prefetch\" is not supported on platforms that lack posix_fadvise()."); + GUC_check_errdetail("\"recovery_prefetch\" is not supported on platforms that lack support for issuing read-ahead advice."); return false; } #endif diff --git a/src/backend/storage/aio/read_stream.c b/src/backend/storage/aio/read_stream.c index 039d3678114..7f0e07d9586 100644 --- a/src/backend/storage/aio/read_stream.c +++ b/src/backend/storage/aio/read_stream.c @@ -24,16 +24,17 @@ * already. There is no benefit to looking ahead more than one block, so * distance is 1. This is the default initial assumption. * - * B) I/O is necessary, but fadvise is undesirable because the access is - * sequential, or impossible because direct I/O is enabled or the system - * doesn't support fadvise. There is no benefit in looking ahead more than + * B) I/O is necessary, but read-ahead advice is undesirable because the + * access is sequential and we can rely on the kernel's read-ahead heuristics, + * or impossible because direct I/O is enabled, or the system doesn't support + * read-ahead advice. There is no benefit in looking ahead more than * io_combine_limit, because in this case the only goal is larger read system * calls. Looking further ahead would pin many buffers and perform - * speculative work looking ahead for no benefit. + * speculative work for no benefit. * - * C) I/O is necessary, it appears random, and this system supports fadvise. - * We'll look further ahead in order to reach the configured level of I/O - * concurrency. + * C) I/O is necessary, it appears to be random, and this system supports + * read-ahead advice. We'll look further ahead in order to reach the + * configured level of I/O concurrency. * * The distance increases rapidly and decays slowly, so that it moves towards * those levels as different I/O patterns are discovered. For example, a |