1
- <!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.474 2009/04/01 03:32:29 tgl Exp $ -->
1
+ <!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.475 2009/04/07 00:31:25 tgl Exp $ -->
2
2
3
3
<chapter id="functions">
4
4
<title>Functions and Operators</title>
@@ -12880,10 +12880,10 @@ SELECT set_config('log_statement_stats', 'off', false);
12880
12880
<tbody>
12881
12881
<row>
12882
12882
<entry>
12883
- <literal><function>pg_start_backup</function>(<parameter>label</> <type>text</>)</literal>
12883
+ <literal><function>pg_start_backup</function>(<parameter>label</> <type>text</> <optional>, <parameter>fast</> <type>boolean</> </optional> )</literal>
12884
12884
</entry>
12885
12885
<entry><type>text</type></entry>
12886
- <entry>Set up for performing on-line backup</entry>
12886
+ <entry>Prepare for performing on-line backup</entry>
12887
12887
</row>
12888
12888
<row>
12889
12889
<entry>
@@ -12932,20 +12932,25 @@ SELECT set_config('log_statement_stats', 'off', false);
12932
12932
</table>
12933
12933
12934
12934
<para>
12935
- <function>pg_start_backup</> accepts a single parameter which is an
12935
+ <function>pg_start_backup</> accepts a text parameter which is an
12936
12936
arbitrary user-defined label for the backup. (Typically this would be
12937
12937
the name under which the backup dump file will be stored.) The function
12938
12938
writes a backup label file into the database cluster's data directory,
12939
- and then returns the backup's starting transaction log location as text. The user
12940
- need not pay any attention to this result value, but it is provided in
12941
- case it is of use.
12939
+ performs a checkpoint,
12940
+ and then returns the backup's starting transaction log location as text.
12941
+ The user need not pay any attention to this result value, but it is
12942
+ provided in case it is of use.
12942
12943
<programlisting>
12943
12944
postgres=# select pg_start_backup('label_goes_here');
12944
12945
pg_start_backup
12945
12946
-----------------
12946
12947
0/D4445B8
12947
12948
(1 row)
12948
12949
</programlisting>
12950
+ There is an optional boolean second parameter. If <literal>true</>,
12951
+ it specifies executing <function>pg_start_backup</> as quickly as
12952
+ possible. This forces an immediate checkpoint which will cause a
12953
+ spike in I/O operations, slowing any concurrently executing queries.
12949
12954
</para>
12950
12955
12951
12956
<para>
@@ -12961,7 +12966,7 @@ postgres=# select pg_start_backup('label_goes_here');
12961
12966
</para>
12962
12967
12963
12968
<para>
12964
- <function>pg_switch_xlog</> moves to the next transaction log file, allowing the
12969
+ <function>pg_switch_xlog</> moves to the next transaction log file, allowing the
12965
12970
current file to be archived (assuming you are using continuous archiving).
12966
12971
The result is the ending transaction log location + 1 within the just-completed transaction log file.
12967
12972
If there has been no transaction log activity since the last transaction log switch,
0 commit comments