From 68beedac7e529a81ebf58ff40d30b28e404b30f5 Mon Sep 17 00:00:00 2001 From: David Steele Date: Thu, 28 Feb 2019 16:55:42 +0200 Subject: [PATCH] Add exclusive backup deprecation notes to documentation. Update the exclusive backup documentation to explain the limitations of the exclusive backup mode and make it clear that the feature is deprecated. --- doc/src/sgml/backup.sgml | 42 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml index a73fd4d044..de1a8a5826 100644 --- a/doc/src/sgml/backup.sgml +++ b/doc/src/sgml/backup.sgml @@ -948,6 +948,48 @@ SELECT * FROM pg_stop_backup(false, true); Making an exclusive low level backup + + + + The exclusive backup method is deprecated and should be avoided in favor + of the non-exclusive backup method or + pg_basebackup. + + + + The primary issue with the exclusive method is that the + backup_label file is written into the data directory + when pg_start_backup is called and remains until + pg_stop_backup is called. If + PostgreSQL or the host terminates abnormally + then backup_label will be left in the data directory + and PostgreSQL will not start. A log message + recommends that backup_label be removed if not + restoring from a backup. + + + + However, if backup_label is present because a restore + is actually in progress, then removing it will result in corruption. For + this reason it is not recommended to automate the removal of + backup_label. + + + + Another issue with exclusive backup mode is that it will continue until + pg_stop_backup is called, even if the calling process + is no longer performing the backup. The next time + pg_start_backup is called it will fail unless + pg_stop_backup is called manually first. + + + + Finally, only one exclusive backup may be run at a time. However, it is + possible to run an exclusive backup at the same time as any number of + non-exclusive backups. + + + The process for an exclusive backup is mostly the same as for a non-exclusive one, but it differs in a few key steps. This type of backup -- 2.17.2 (Apple Git-113)