summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/func.sgml48
1 files changed, 33 insertions, 15 deletions
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 1bc9fbc4f51..c6017e61aee 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -17478,7 +17478,7 @@ SELECT set_config('log_statement_stats', 'off', false);
</row>
<row>
<entry>
- <literal><function>pg_start_backup(<parameter>label</> <type>text</> <optional>, <parameter>fast</> <type>boolean</> </optional>)</function></literal>
+ <literal><function>pg_start_backup(<parameter>label</> <type>text</> <optional>, <parameter>fast</> <type>boolean</> <optional>, <parameter>exclusive</> <type>boolean</> </optional></optional>)</function></literal>
</entry>
<entry><type>pg_lsn</type></entry>
<entry>Prepare for performing on-line backup (restricted to superusers or replication roles)</entry>
@@ -17488,7 +17488,14 @@ SELECT set_config('log_statement_stats', 'off', false);
<literal><function>pg_stop_backup()</function></literal>
</entry>
<entry><type>pg_lsn</type></entry>
- <entry>Finish performing on-line backup (restricted to superusers or replication roles)</entry>
+ <entry>Finish performing exclusive on-line backup (restricted to superusers or replication roles)</entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_stop_backup(<parameter>exclusive</> <type>boolean</>)</function></literal>
+ </entry>
+ <entry><type>setof record</type></entry>
+ <entry>Finish performing exclusive or non-exclusive on-line backup (restricted to superusers or replication roles)</entry>
</row>
<row>
<entry>
@@ -17537,15 +17544,19 @@ SELECT set_config('log_statement_stats', 'off', false);
</table>
<para>
- <function>pg_start_backup</> accepts an
- arbitrary user-defined label for the backup. (Typically this would be
- the name under which the backup dump file will be stored.) The function
- writes a backup label file (<filename>backup_label</>) and, if there
- are any links in the <filename>pg_tblspc/</> directory, a tablespace map
- file (<filename>tablespace_map</>) into the database cluster's data
- directory, performs a checkpoint, and then returns the backup's starting
- transaction log location as text. The user can ignore this result value,
- but it is provided in case it is useful.
+ <function>pg_start_backup</> accepts an arbitrary user-defined label for
+ the backup. (Typically this would be the name under which the backup dump
+ file will be stored.) When used in exclusive mode, the function writes a
+ backup label file (<filename>backup_label</>) and, if there are any links
+ in the <filename>pg_tblspc/</> directory, a tablespace map file
+ (<filename>tablespace_map</>) into the database cluster's data directory,
+ performs a checkpoint, and then returns the backup's starting transaction
+ log location as text. The user can ignore this result value, but it is
+ provided in case it is useful. When used in non-exclusive mode, the
+ contents of these files are instead returned by the
+ <function>pg_stop_backup</> function, and should be written to the backup
+ by the caller.
+
<programlisting>
postgres=# select pg_start_backup('label_goes_here');
pg_start_backup
@@ -17560,10 +17571,17 @@ postgres=# select pg_start_backup('label_goes_here');
</para>
<para>
- <function>pg_stop_backup</> removes the label file and, if it exists,
- the <filename>tablespace_map</> file created by
- <function>pg_start_backup</>, and creates a backup history file in
- the transaction log archive area. The history file includes the label given to
+ In an exclusive backup, <function>pg_stop_backup</> removes the label file
+ and, if it exists, the <filename>tablespace_map</> file created by
+ <function>pg_start_backup</>. In a non-exclusive backup, the contents of
+ the <filename>backup_label</> and <filename>tablespace_map</> are returned
+ in the result of the function, and should be written to files in the
+ backup (and not in the data directory).
+ </para>
+
+ <para>
+ The function also creates a backup history file in the transaction log
+ archive area. The history file includes the label given to
<function>pg_start_backup</>, the starting and ending transaction log locations for
the backup, and the starting and ending times of the backup. The return
value is the backup's ending transaction log location (which again