Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit694c56a

Browse files
committed
Improve WAL reliability documentation, and add more cross-references to it.
In particular, we are now more explicit about the fact that you may needwal_sync_method=fsync_writethrough for crash-safety on some platforms,including MaxOS X. There's also now an explicit caution against assumingthat the default setting of wal_sync_method is either crash-safe or bestfor performance.
1 parent3e5f941 commit694c56a

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

‎doc/src/sgml/config.sgml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1570,7 +1570,11 @@ SET ENABLE_SEQSCAN TO OFF;
15701570
<para>
15711571
Not all of these choices are available on all platforms.
15721572
The default is the first method in the above list that is supported
1573-
by the platform.
1573+
by the platform. The default is not necessarily best; it may be
1574+
necessary to change this setting, or other aspects of your system
1575+
configuration, in order to create a crash-safe configuration, as
1576+
discussed in <xref linkend="wal-reliability">, or to achieve best
1577+
performance.
15741578
The <literal>open_</>* options also use <literal>O_DIRECT</> if available.
15751579
The utility <filename>src/tools/fsync</> in the PostgreSQL source tree
15761580
can do performance testing of various fsync methods.

‎doc/src/sgml/wal.sgml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,9 @@
8585
by unchecking <literal>My Computer\Open\{select disk
8686
drive}\Properties\Hardware\Properties\Policies\Enable write caching on
8787
the disk</>. Also on Windows, <literal>fsync</> and
88-
<literal>fsync_writethrough</> never do write caching.
88+
<literal>fsync_writethrough</> never do write caching. The
89+
<literal>fsync_writethrough</> option can also be used to disable
90+
write caching on <productname>MacOS X</>.
8991
</para>
9092

9193
<para>
@@ -529,8 +531,10 @@
529531
The <xref linkend="guc-wal-sync-method"> parameter determines how
530532
<productname>PostgreSQL</productname> will ask the kernel to force
531533
<acronym>WAL</acronym> updates out to disk.
532-
All the options should be the same in terms of reliability,
533-
but it's quite platform-specific which one will be the fastest.
534+
With the exception of <literal>fsync_writethrough</>, which can sometimes
535+
force a flush of the disk cache even when other options do not do so,
536+
all the options should be the same in terms of reliability.
537+
However, it's quite platform-specific which one will be the fastest.
534538
Note that this parameter is irrelevant if <varname>fsync</varname>
535539
has been turned off.
536540
</para>
@@ -590,6 +594,7 @@
590594
irrecoverable data corruption. Administrators should try to ensure
591595
that disks holding <productname>PostgreSQL</productname>'s
592596
<acronym>WAL</acronym> log files do not make such false reports.
597+
(See <xref linkend="wal-reliability">.)
593598
</para>
594599

595600
<para>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp