Improve WAL reliability documentation, and add more cross-references to it.
authorRobert Haas
Thu, 7 Oct 2010 16:19:03 +0000 (12:19 -0400)
committerRobert Haas
Thu, 7 Oct 2010 16:22:00 +0000 (12:22 -0400)
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.

doc/src/sgml/config.sgml
doc/src/sgml/wal.sgml

index affce37d0d22d2e8883fc892fa1a29c36c63df46..87d182c4c45b9e8542ae6b4bfed1c9d3cc388089 100644 (file)
@@ -1570,7 +1570,11 @@ SET ENABLE_SEQSCAN TO OFF;
        
         Not all of these choices are available on all platforms.
         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 , or to achieve best
+        performance.
         The open_* options also use O_DIRECT if available.
         The utility src/tools/fsync in the PostgreSQL source tree
         can do performance testing of various fsync methods.
index 6730c9328edccd4a2c5d59f9df45763852ea4d1e..2726acb8a7e370ee3391fbd16fd11db411247e07 100644 (file)
@@ -85,7 +85,9 @@
    by unchecking My Computer\Open\{select disk
    drive}\Properties\Hardware\Properties\Policies\Enable write caching on
    the disk.  Also on Windows, fsync and
-   fsync_writethrough never do write caching.
+   fsync_writethrough never do write caching.  The
+   fsync_writethrough option can also be used to disable
+   write caching on MacOS X.
   
 
   
    The  parameter determines how
    PostgreSQL will ask the kernel to force
     WAL updates out to disk.
-   All the options should be the same in terms of reliability,
-   but it's quite platform-specific which one will be the fastest.
+   With the exception of fsync_writethrough, which can sometimes
+   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 fsync
    has been turned off.
   
    irrecoverable data corruption.  Administrators should try to ensure
    that disks holding PostgreSQL's
    WAL log files do not make such false reports.
+   (See .)