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 $ -->
22
33 <chapter id="functions">
44 <title>Functions and Operators</title>
@@ -12880,10 +12880,10 @@ SELECT set_config('log_statement_stats', 'off', false);
1288012880 <tbody>
1288112881 <row>
1288212882 <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>
1288412884 </entry>
1288512885 <entry><type>text</type></entry>
12886- <entry>Set up for performing on-line backup</entry>
12886+ <entry>Prepare for performing on-line backup</entry>
1288712887 </row>
1288812888 <row>
1288912889 <entry>
@@ -12932,20 +12932,25 @@ SELECT set_config('log_statement_stats', 'off', false);
1293212932 </table>
1293312933
1293412934 <para>
12935- <function>pg_start_backup</> accepts asingle parameter which is an
12935+ <function>pg_start_backup</> accepts atext parameter which is an
1293612936 arbitrary user-defined label for the backup. (Typically this would be
1293712937 the name under which the backup dump file will be stored.) The function
1293812938 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.
1294212943<programlisting>
1294312944postgres=# select pg_start_backup('label_goes_here');
1294412945 pg_start_backup
1294512946-----------------
1294612947 0/D4445B8
1294712948(1 row)
1294812949</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.
1294912954 </para>
1295012955
1295112956 <para>
@@ -12961,7 +12966,7 @@ postgres=# select pg_start_backup('label_goes_here');
1296112966 </para>
1296212967
1296312968 <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
1296512970 current file to be archived (assuming you are using continuous archiving).
1296612971 The result is the ending transaction log location + 1 within the just-completed transaction log file.
1296712972 If there has been no transaction log activity since the last transaction log switch,