Additional notes for pg_dump/restore

  Simon Riggs             
Index: doc/src/sgml/backup.sgml
RCS file: /projects/cvsroot/pgsql/doc/src/sgml/backup.sgml,v
retrieving revision 2.86
diff -c -r2.86 backup.sgml
*** doc/src/sgml/backup.sgml	16 Sep 2006 00:30:11 -0000	2.86
--- doc/src/sgml/backup.sgml	19 Sep 2006 11:55:32 -0000
*** 123,128 ****
--- 123,146 ----
+     By default, the <application>psql</> script will continue to execute
+     after an SQL error is encountered and returns 0 in that case. You may
+     wish to use the following command at the top of the script to alter 
+     that behaviour and report errors with a return code 3.
+ <programlisting>
+ </programlisting>
+     Either way, you will only have a partially restored dump. Alternatively,
+     you can specify that the whole dump is run as a single transaction, so
+     the restore is fully completed, or fully rolled back. This mode can be
+     specified using the command line options <command>psql -1</> or
+     <command>psql --single-transaction</>. When using that option, be warned 
+     that even the smallest of errors can rollback a restore that has already
+     run for many hours. However, that may still be preferable to clearing up
+     a complex database after a partially restored dump.
+    </para>   
+    <para>
      Once restored, it is wise to run <xref linkend="sql-analyze"
      endterm="sql-analyze-title"> on each database so the optimizer has
      useful statistics. An easy way to do this is to run
---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Reply via email to