aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2008-04-05 01:34:06 +0000
committerBruce Momjian <bruce@momjian.us>2008-04-05 01:34:06 +0000
commit2a1cf97c22933368c8747711da0f30c35f4bddcd (patch)
tree59279eadb6955d135c10429f5843a6d71cc85f75 /doc/src
parenta0fad9762a22e739de69c85b51ff7a47e672732f (diff)
downloadpostgresql-2a1cf97c22933368c8747711da0f30c35f4bddcd.tar.gz
postgresql-2a1cf97c22933368c8747711da0f30c35f4bddcd.zip
Have pg_stop_backup() wait for all archive files to be sent, rather than
returing right away. This guarantees that when pg_stop_backup() returns, you have a valid backup. Simon Riggs
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/backup.sgml24
1 files changed, 16 insertions, 8 deletions
diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml
index 9f369f8e6d1..2697edf86e3 100644
--- a/doc/src/sgml/backup.sgml
+++ b/doc/src/sgml/backup.sgml
@@ -1,4 +1,4 @@
-<!-- $PostgreSQL: pgsql/doc/src/sgml/backup.sgml,v 2.116 2008/03/28 15:00:28 heikki Exp $ -->
+<!-- $PostgreSQL: pgsql/doc/src/sgml/backup.sgml,v 2.117 2008/04/05 01:34:05 momjian Exp $ -->
<chapter id="backup">
<title>Backup and Restore</title>
@@ -761,12 +761,19 @@ SELECT pg_stop_backup();
<para>
Once the WAL segment files used during the backup are archived, you are
done. The file identified by <function>pg_stop_backup</>'s result is
- the last segment that needs to be archived to complete the backup.
- Archival of these files will happen automatically, since you have
- already configured <varname>archive_command</>. In many cases, this
- happens fairly quickly, but you are advised to monitor your archival
- system to ensure this has taken place so that you can be certain you
- have a complete backup.
+ the last segment that is required to form a complete set of backup files.
+ <function>pg_stop_backup</> does not return until the last segment has
+ been archived.
+ Archiving of these files happens automatically since you have
+ already configured <varname>archive_command</>. In most cases this
+ happens quickly, but you are advised to monitor your archive
+ system to ensure there are no delays.
+ If the archive process has fallen behind
+ because of failures of the archive command, it will keep retrying
+ until the archive succeeds and the backup is complete.
+ If you wish to place a time limit on the execution of
+ <function>pg_stop_backup</>, set an appropriate
+ <varname>statement_timeout</varname> value.
</para>
</listitem>
</orderedlist>
@@ -1044,7 +1051,7 @@ restore_command = 'cp /mnt/server/archivedir/%f %p'
<note>
<para>
The stop point must be after the ending time of the base backup, i.e.,
- the time of <function>pg_stop_backup</>. You cannot use a base backup
+ the end time of <function>pg_stop_backup</>. You cannot use a base backup
to recover to a time when that backup was still going on. (To
recover to such a time, you must go back to your previous base backup
and roll forward from there.)
@@ -1322,6 +1329,7 @@ tar -rf /var/lib/pgsql/backup.tar /var/lib/pgsql/archive/
After the backup the switch file is removed. Archived WAL files are
then added to the backup so that both base backup and all required
WAL files are part of the same <application>tar</> file.
+ Please remember to add error handling to your backup scripts.
</para>
</sect3>