@@ -889,8 +889,11 @@ SELECT pg_start_backup('label', false, false);
889889<programlisting>
890890SELECT * FROM pg_stop_backup(false);
891891</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
894897 the last WAL segment file written during the backup interval to be
895898 ready to archive.
896899 </para>
@@ -908,7 +911,7 @@ SELECT * FROM pg_stop_backup(false);
908911 Once the WAL segment files active during the backup are archived, you are
909912 done. The file identified by <function>pg_stop_backup</>'s first return
910913 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,
912915 <function>pg_stop_backup</> does not return until the last segment has
913916 been archived.
914917 Archiving of these files happens automatically since you have
@@ -924,6 +927,13 @@ SELECT * FROM pg_stop_backup(false);
924927 <function>pg_stop_backup</> terminates because of this your backup
925928 may not be valid.
926929 </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+
927937 </listitem>
928938 </orderedlist>
929939 </para>
@@ -932,9 +942,9 @@ SELECT * FROM pg_stop_backup(false);
932942 <title>Making an exclusive low level backup</title>
933943 <para>
934944 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
938948 was the only low-level method available, but it is now recommended that
939949 all users upgrade their scripts to use non-exclusive backups if possible.
940950 </para>
@@ -992,6 +1002,11 @@ SELECT pg_start_backup('label', true);
9921002 <xref linkend="backup-lowlevel-base-backup-data"> for things to
9931003 consider during this backup.
9941004 </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>
9951010 </listitem>
9961011 <listitem>
9971012 <para>
0 commit comments