1- <!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.128 2007/06/22 16:15:23 tgl Exp $ -->
1+ <!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.129 2007/06/28 00:02:37 tgl Exp $ -->
22
33<chapter Id="runtime-config">
44 <title>Server Configuration</title>
@@ -1168,21 +1168,17 @@ SET ENABLE_SEQSCAN TO OFF;
11681168
11691169 <para>
11701170 Beginning in <productname>PostgreSQL</> 8.0, there is a separate server
1171- process called the <firstterm>background writer</>, whosesole function
1171+ process called the <firstterm>background writer</>, whose function
11721172 is to issue writes of <quote>dirty</> shared buffers. The intent is
11731173 that server processes handling user queries should seldom or never have
11741174 to wait for a write to occur, because the background writer will do it.
1175- This arrangement also reduces the performance penalty associated with
1176- checkpoints. The background writer will continuously trickle out dirty
1177- pages to disk, so that only a few pages will need to be forced out when
1178- checkpoint time arrives, instead of the storm of dirty-buffer writes that
1179- formerly occurred at each checkpoint. However there is a net overall
1175+ However there is a net overall
11801176 increase in I/O load, because where a repeatedly-dirtied page might
11811177 before have been written only once per checkpoint interval, the
11821178 background writer might write it several times in the same interval.
11831179 In most situations a continuous low load is preferable to periodic
1184- spikes, but the parameters discussed in this subsection can be used to tune
1185- the behavior for local needs.
1180+ spikes, but the parameters discussed in this subsection can be used to
1181+ tune the behavior for local needs.
11861182 </para>
11871183
11881184 <variablelist>
@@ -1242,62 +1238,14 @@ SET ENABLE_SEQSCAN TO OFF;
12421238 </para>
12431239 </listitem>
12441240 </varlistentry>
1245-
1246- <varlistentry id="guc-bgwriter-all-percent" xreflabel="bgwriter_all_percent">
1247- <term><varname>bgwriter_all_percent</varname> (<type>floating point</type>)</term>
1248- <indexterm>
1249- <primary><varname>bgwriter_all_percent</> configuration parameter</primary>
1250- </indexterm>
1251- <listitem>
1252- <para>
1253- To reduce the amount of work that will be needed at checkpoint time,
1254- the background writer also does a circular scan through the entire
1255- buffer pool, writing buffers that are found to be dirty.
1256- In each round, it examines up to
1257- <varname>bgwriter_all_percent</> of the buffers for this purpose.
1258- The default value is 0.333 (0.333% of the total number
1259- of shared buffers). With the default <varname>bgwriter_delay</>
1260- setting, this will allow the entire shared buffer pool to be scanned
1261- about once per minute.
1262- This parameter can only be set in the <filename>postgresql.conf</>
1263- file or on the server command line.
1264- </para>
1265- </listitem>
1266- </varlistentry>
1267-
1268- <varlistentry id="guc-bgwriter-all-maxpages" xreflabel="bgwriter_all_maxpages">
1269- <term><varname>bgwriter_all_maxpages</varname> (<type>integer</type>)</term>
1270- <indexterm>
1271- <primary><varname>bgwriter_all_maxpages</> configuration parameter</primary>
1272- </indexterm>
1273- <listitem>
1274- <para>
1275- In each round, no more than this many buffers will be written
1276- as a result of the scan of the entire buffer pool. (If this
1277- limit is reached, the scan stops, and resumes at the next buffer
1278- during the next round.)
1279- The default value is five buffers.
1280- This parameter can only be set in the <filename>postgresql.conf</>
1281- file or on the server command line.
1282- </para>
1283- </listitem>
1284- </varlistentry>
12851241 </variablelist>
12861242
12871243 <para>
1288- Smaller values of <varname>bgwriter_all_percent</varname> and
1289- <varname>bgwriter_all_maxpages</varname> reduce the extra I/O load
1290- caused by the background writer, but leave more work to be done
1291- at checkpoint time. To reduce load spikes at checkpoints,
1292- increase these two values.
1293- Similarly, smaller values of <varname>bgwriter_lru_percent</varname> and
1244+ Smaller values of <varname>bgwriter_lru_percent</varname> and
12941245 <varname>bgwriter_lru_maxpages</varname> reduce the extra I/O load
12951246 caused by the background writer, but make it more likely that server
12961247 processes will have to issue writes for themselves, delaying interactive
12971248 queries.
1298- To disable background writing entirely,
1299- set both <varname>maxpages</varname> values and/or both
1300- <varname>percent</varname> values to zero.
13011249 </para>
13021250 </sect2>
13031251 </sect1>
@@ -1307,7 +1255,7 @@ SET ENABLE_SEQSCAN TO OFF;
13071255
13081256 <para>
13091257 See also <xref linkend="wal-configuration"> for details on WAL
1310- tuning.
1258+ and checkpoint tuning.
13111259 </para>
13121260
13131261 <sect2 id="runtime-config-wal-settings">
@@ -1565,6 +1513,22 @@ SET ENABLE_SEQSCAN TO OFF;
15651513 </listitem>
15661514 </varlistentry>
15671515
1516+ <varlistentry id="guc-checkpoint-completion-target" xreflabel="checkpoint_completion_target">
1517+ <term><varname>checkpoint_completion_target</varname> (<type>floating point</type>)</term>
1518+ <indexterm>
1519+ <primary><varname>checkpoint_completion_target</> configuration parameter</primary>
1520+ </indexterm>
1521+ <listitem>
1522+ <para>
1523+ Specifies the target length of checkpoints, as a fraction of
1524+ the checkpoint interval. The default is 0.5.
1525+
1526+ This parameter can only be set in the <filename>postgresql.conf</>
1527+ file or on the server command line.
1528+ </para>
1529+ </listitem>
1530+ </varlistentry>
1531+
15681532 <varlistentry id="guc-checkpoint-warning" xreflabel="checkpoint_warning">
15691533 <term><varname>checkpoint_warning</varname> (<type>integer</type>)</term>
15701534 <indexterm>