diff options
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/backup.sgml | 13 | ||||
-rw-r--r-- | doc/src/sgml/func.sgml | 7 |
2 files changed, 15 insertions, 5 deletions
diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml index 7820de931c..0e7c6e2051 100644 --- a/doc/src/sgml/backup.sgml +++ b/doc/src/sgml/backup.sgml @@ -1012,10 +1012,15 @@ SELECT pg_start_backup('label', true); <programlisting> SELECT pg_stop_backup(); </programlisting> - This terminates the backup mode and performs an automatic switch to - the next WAL segment. The reason for the switch is to arrange for - the last WAL segment file written during the backup interval to be - ready to archive. + This function, when called on a primary, terminates the backup mode and + performs an automatic switch to the next WAL segment. The reason for the + switch is to arrange for the last WAL segment written during the backup + interval to be ready to archive. When called on a standby, this function + only terminates backup mode. A subsequent WAL segment switch will be + needed in order to ensure that all WAL files needed to restore the backup + can be archived; if the primary does not have sufficient write activity + to trigger one, <function>pg_switch_wal</function> should be executed on + the primary. </para> </listitem> <listitem> diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 36319222e6..b43ec30a4e 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -18597,7 +18597,12 @@ postgres=# select pg_start_backup('label_goes_here'); WAL to be archived. This behavior is only useful for backup software which independently monitors WAL archiving. Otherwise, WAL required to make the backup consistent might be missing and make the backup - useless. + useless. When this parameter is set to true, <function>pg_stop_backup</> + will wait for WAL to be archived when archiving is enabled; on the standby, + this means that it will wait only when <varname>archive_mode = always</>. + If write activity on the primary is low, it may be useful to run + <function>pg_switch_wal</> on the primary in order to trigger + an immediate segment switch. </para> <para> |