mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
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 <thomas.munro@gmail.com> Discussion: https://www.postgresql.org/message-id/flat/0827edec-1317-4917-a186-035eb1e3241d%40eisentraut.org
This commit is contained in:
@ -2679,11 +2679,9 @@ include_dir 'conf.d'
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Asynchronous I/O depends on an effective <function>posix_fadvise</function>
|
||||
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.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
@ -3852,10 +3850,8 @@ include_dir 'conf.d'
|
||||
<literal>off</literal>, <literal>on</literal> and
|
||||
<literal>try</literal> (the default). The setting
|
||||
<literal>try</literal> enables
|
||||
prefetching only if the operating system provides the
|
||||
<function>posix_fadvise</function> 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.
|
||||
</para>
|
||||
<para>
|
||||
Prefetching blocks that will soon be needed can reduce I/O wait times
|
||||
|
@ -841,8 +841,8 @@
|
||||
The <xref linkend="guc-maintenance-io-concurrency"/> and
|
||||
<xref linkend="guc-wal-decode-buffer-size"/> settings limit prefetching
|
||||
concurrency and distance, respectively. By default, it is set to
|
||||
<literal>try</literal>, which enables the feature on systems where
|
||||
<function>posix_fadvise</function> is available.
|
||||
<literal>try</literal>, which enables the feature on systems that support
|
||||
issuing read-ahead advice.
|
||||
</para>
|
||||
</sect1>
|
||||
|
||||
|
Reference in New Issue
Block a user