mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-09-30 19:41:17 +02:00
Improve WAL reliability documentation, and add more cross-references to it.
In particular, we are now more explicit about the fact that you may need wal_sync_method=fsync_writethrough for crash-safety on some platforms, including MaxOS X. There's also now an explicit caution against assuming that the default setting of wal_sync_method is either crash-safe or best for performance.
This commit is contained in:
parent
3e5f9412d0
commit
694c56af2b
@ -1570,7 +1570,11 @@ SET ENABLE_SEQSCAN TO OFF;
|
|||||||
<para>
|
<para>
|
||||||
Not all of these choices are available on all platforms.
|
Not all of these choices are available on all platforms.
|
||||||
The default is the first method in the above list that is supported
|
The default is the first method in the above list that is supported
|
||||||
by the platform.
|
by the platform. The default is not necessarily best; it may be
|
||||||
|
necessary to change this setting, or other aspects of your system
|
||||||
|
configuration, in order to create a crash-safe configuration, as
|
||||||
|
discussed in <xref linkend="wal-reliability">, or to achieve best
|
||||||
|
performance.
|
||||||
The <literal>open_</>* options also use <literal>O_DIRECT</> if available.
|
The <literal>open_</>* options also use <literal>O_DIRECT</> if available.
|
||||||
The utility <filename>src/tools/fsync</> in the PostgreSQL source tree
|
The utility <filename>src/tools/fsync</> in the PostgreSQL source tree
|
||||||
can do performance testing of various fsync methods.
|
can do performance testing of various fsync methods.
|
||||||
|
@ -85,7 +85,9 @@
|
|||||||
by unchecking <literal>My Computer\Open\{select disk
|
by unchecking <literal>My Computer\Open\{select disk
|
||||||
drive}\Properties\Hardware\Properties\Policies\Enable write caching on
|
drive}\Properties\Hardware\Properties\Policies\Enable write caching on
|
||||||
the disk</>. Also on Windows, <literal>fsync</> and
|
the disk</>. Also on Windows, <literal>fsync</> and
|
||||||
<literal>fsync_writethrough</> never do write caching.
|
<literal>fsync_writethrough</> never do write caching. The
|
||||||
|
<literal>fsync_writethrough</> option can also be used to disable
|
||||||
|
write caching on <productname>MacOS X</>.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@ -529,8 +531,10 @@
|
|||||||
The <xref linkend="guc-wal-sync-method"> parameter determines how
|
The <xref linkend="guc-wal-sync-method"> parameter determines how
|
||||||
<productname>PostgreSQL</productname> will ask the kernel to force
|
<productname>PostgreSQL</productname> will ask the kernel to force
|
||||||
<acronym>WAL</acronym> updates out to disk.
|
<acronym>WAL</acronym> updates out to disk.
|
||||||
All the options should be the same in terms of reliability,
|
With the exception of <literal>fsync_writethrough</>, which can sometimes
|
||||||
but it's quite platform-specific which one will be the fastest.
|
force a flush of the disk cache even when other options do not do so,
|
||||||
|
all the options should be the same in terms of reliability.
|
||||||
|
However, it's quite platform-specific which one will be the fastest.
|
||||||
Note that this parameter is irrelevant if <varname>fsync</varname>
|
Note that this parameter is irrelevant if <varname>fsync</varname>
|
||||||
has been turned off.
|
has been turned off.
|
||||||
</para>
|
</para>
|
||||||
@ -590,6 +594,7 @@
|
|||||||
irrecoverable data corruption. Administrators should try to ensure
|
irrecoverable data corruption. Administrators should try to ensure
|
||||||
that disks holding <productname>PostgreSQL</productname>'s
|
that disks holding <productname>PostgreSQL</productname>'s
|
||||||
<acronym>WAL</acronym> log files do not make such false reports.
|
<acronym>WAL</acronym> log files do not make such false reports.
|
||||||
|
(See <xref linkend="wal-reliability">.)
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
|
Loading…
Reference in New Issue
Block a user