Update docs as to when WAL logging can be skipped.
authorRobert Haas
Tue, 20 Apr 2010 00:26:06 +0000 (00:26 +0000)
committerRobert Haas
Tue, 20 Apr 2010 00:26:06 +0000 (00:26 +0000)
In 8.4 and prior, WAL-logging could potentially be skipped whenever
archive_mode=off.  With streaming replication, this is now true only
if max_wal_senders=0.

Fujii Masao, with light copyediting by me

doc/src/sgml/backup.sgml
doc/src/sgml/perform.sgml

index 9dbcb4daa6976668b64de45f1244a616d88400d6..3c5e0d5a8ecd7ede50052e059b2521860eae3d41 100644 (file)
@@ -1,4 +1,4 @@
-
+
 
 
  Backup and Restore
@@ -689,13 +689,14 @@ archive_command = 'test ! -f /mnt/server/archivedir/%f && cp %p /mnt/ser
    
 
    
-    When archive_mode is off some SQL commands
+    When archive_mode is off and 
+    linkend="guc-max-wal-senders"> is zero some SQL commands
     are optimized to avoid WAL logging, as described in 
-    linkend="populate-pitr">. If archiving were turned on during execution
-    of one of these statements, WAL would not contain enough information
-    for archive recovery.  (Crash recovery is unaffected.)  For
-    this reason, archive_mode can only be changed at server
-    start.  However, archive_command can be changed with a
+    linkend="populate-pitr">.  If archiving or streaming replication were
+    turned on during execution of one of these statements, WAL would not
+    contain enough information for archive recovery.  (Crash recovery is
+    unaffected.)  For this reason, these parameters can only be changed at
+    server start.  However, archive_command can be changed with a
     configuration file reload.  If you wish to temporarily stop archiving,
     one way to do it is to set archive_command to the empty
     string ('').
index d7c36cc4e9f9a2be2e3873a9226f73b97cb49e34..ccccb3fefb0036945b13dc5f17f8642cecec221d 100644 (file)
@@ -1,4 +1,4 @@
-
+
 
  
   Performance Tips
@@ -910,24 +910,28 @@ SELECT * FROM x, y, a, b, c WHERE something AND somethingelse;
   
 
   
-   Turn off <varname>archive_mode</varname>
+   Turn off <varname>archive_mode</varname><span class="marked"> and streaming replication</span>
 
    
     When loading large amounts of data into an installation that uses
-    WAL archiving, you might want to disable archiving (turn off the
-     configuration variable)
+    WAL archiving or streaming replication, you might want to disable
+    archiving (turn off the 
+    configuration variable) and replication (zero the
+     configuration variable)
     while loading.  It might be
     faster to take a new base backup after the load has completed
     than to process a large amount of incremental WAL data.
-    But note that turning archive_mode on or off
-    requires a server restart.
+    But note that changing either of these variables requires
+    a server restart.
    
 
    
-    Aside from avoiding the time for the archiver to process the WAL data,
+    Aside from avoiding the time for the archiver or WAL sender to
+    process the WAL data,
     doing this will actually make certain commands faster, because they
     are designed not to write WAL at all if archive_mode
-    is off.  (They can guarantee crash safety more cheaply by doing an
+    is off and max_wal_senders is zero.  (They can
+    guarantee crash safety more cheaply by doing an
     fsync at the end than by writing WAL.)
     This applies to the following commands: