@@ -889,8 +889,11 @@ SELECT pg_start_backup('label', false, false);
889
889
<programlisting>
890
890
SELECT * FROM pg_stop_backup(false);
891
891
</programlisting>
892
- This terminates the backup mode and performs an automatic switch to
893
- the next WAL segment. The reason for the switch is to arrange for
892
+ This terminates backup mode. On a primary, it also performs an automatic
893
+ switch to the next WAL segment. On a standby, it is not possible to
894
+ automatically switch WAL segments, so you may wish to run
895
+ <function>pg_switch_xlog</function> on the primary to perform a manual
896
+ switch. The reason for the switch is to arrange for
894
897
the last WAL segment file written during the backup interval to be
895
898
ready to archive.
896
899
</para>
@@ -908,7 +911,7 @@ SELECT * FROM pg_stop_backup(false);
908
911
Once the WAL segment files active during the backup are archived, you are
909
912
done. The file identified by <function>pg_stop_backup</>'s first return
910
913
value is the last segment that is required to form a complete set of
911
- backup files. If <varname>archive_mode</> is enabled,
914
+ backup files. On a primary, if <varname>archive_mode</> is enabled,
912
915
<function>pg_stop_backup</> does not return until the last segment has
913
916
been archived.
914
917
Archiving of these files happens automatically since you have
@@ -924,6 +927,13 @@ SELECT * FROM pg_stop_backup(false);
924
927
<function>pg_stop_backup</> terminates because of this your backup
925
928
may not be valid.
926
929
</para>
930
+
931
+ <para>
932
+ Note that on a standby <function>pg_stop_backup</> does not wait for
933
+ WAL segments to be archived so the backup process must ensure that all WAL
934
+ segments required for the backup are successfully archived.
935
+ </para>
936
+
927
937
</listitem>
928
938
</orderedlist>
929
939
</para>
@@ -932,9 +942,9 @@ SELECT * FROM pg_stop_backup(false);
932
942
<title>Making an exclusive low level backup</title>
933
943
<para>
934
944
The process for an exclusive backup is mostly the same as for a
935
- non-exclusive one, but it differs in a few key steps. It does not allow
936
- more than one concurrent backup to run, and there can be some issues on
937
- the server if it crashes during the backup. Prior to PostgreSQL 9.6, this
945
+ non-exclusive one, but it differs in a few key steps. This type of backup
946
+ can only be taken on a primary and does not allow concurrent backups.
947
+ Prior to <productname> PostgreSQL</> 9.6, this
938
948
was the only low-level method available, but it is now recommended that
939
949
all users upgrade their scripts to use non-exclusive backups if possible.
940
950
</para>
@@ -992,6 +1002,11 @@ SELECT pg_start_backup('label', true);
992
1002
<xref linkend="backup-lowlevel-base-backup-data"> for things to
993
1003
consider during this backup.
994
1004
</para>
1005
+ <para>
1006
+ Note that if the server crashes during the backup it may not be
1007
+ possible to restart until the <literal>backup_label</> file has been
1008
+ manually deleted from the <envar>PGDATA</envar> directory.
1009
+ </para>
995
1010
</listitem>
996
1011
<listitem>
997
1012
<para>
0 commit comments