From 6654bb92047b37cee053cedd6fa1829841b2ad8e Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Wed, 28 Aug 2024 07:26:48 +0200 Subject: Add prefetching support on macOS macOS doesn't have posix_fadvise(), but fcntl() with the F_RDADVISE command does the same thing. Some related documentation has been generalized to not mention posix_advise() specifically anymore. Reviewed-by: Thomas Munro Discussion: https://www.postgresql.org/message-id/flat/0827edec-1317-4917-a186-035eb1e3241d%40eisentraut.org --- doc/src/sgml/config.sgml | 14 +++++--------- doc/src/sgml/wal.sgml | 4 ++-- 2 files changed, 7 insertions(+), 11 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index 2937384b001..12feac60874 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -2679,11 +2679,9 @@ include_dir 'conf.d' - Asynchronous I/O depends on an effective posix_fadvise - function, which some operating systems lack. If the function is not - present then setting this parameter to anything but zero will result - in an error. On some operating systems (e.g., Solaris), the function - is present but does not actually do anything. + Asynchronous I/O requires that the operating system supports issuing + read-ahead advice. If there is no operating system support then + setting this parameter to anything but zero will result in an error. @@ -3852,10 +3850,8 @@ include_dir 'conf.d' off, on and try (the default). The setting try enables - prefetching only if the operating system provides the - posix_fadvise function, which is currently used - to implement prefetching. Note that some operating systems provide the - function, but it doesn't do anything. + prefetching only if the operating system provides support for issuing + read-ahead advice. Prefetching blocks that will soon be needed can reduce I/O wait times diff --git a/doc/src/sgml/wal.sgml b/doc/src/sgml/wal.sgml index d5df65bc693..0ba0c930b78 100644 --- a/doc/src/sgml/wal.sgml +++ b/doc/src/sgml/wal.sgml @@ -841,8 +841,8 @@ The and settings limit prefetching concurrency and distance, respectively. By default, it is set to - try, which enables the feature on systems where - posix_fadvise is available. + try, which enables the feature on systems that support + issuing read-ahead advice. -- cgit v1.2.3