aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2011-01-22 20:31:24 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2011-01-22 20:31:24 -0500
commit0f73aae13def660371c34c8feda6e684e6366bdb (patch)
tree8428d4ae32b17ff45efbca1c8ef4de5e80d253bb /doc/src
parent518b1e96c02ba0fa52227c528d6e951004d0653f (diff)
downloadpostgresql-0f73aae13def660371c34c8feda6e684e6366bdb.tar.gz
postgresql-0f73aae13def660371c34c8feda6e684e6366bdb.zip
Allow the wal_buffers setting to be auto-tuned to a reasonable value.
If wal_buffers is initially set to -1 (which is now the default), it's replaced by 1/32nd of shared_buffers, with a minimum of 8 (the old default) and a maximum of the XLOG segment size. The allowed range for manual settings is still from 4 up to whatever will fit in shared memory. Greg Smith, with implementation correction by me.
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/config.sgml25
1 files changed, 19 insertions, 6 deletions
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index 8e2a2c5d736..570c7c3b7de 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -1638,12 +1638,25 @@ SET ENABLE_SEQSCAN TO OFF;
</indexterm>
<listitem>
<para>
- The amount of memory used in shared memory for WAL data. The
- default is 64 kilobytes (<literal>64kB</>). The setting need only
- be large enough to hold the amount of WAL data generated by one
- typical transaction, since the data is written out to disk at
- every transaction commit. This parameter can only be set at server
- start.
+ The amount of shared memory used for WAL data that has not yet been
+ written to disk. The default setting of -1 selects a size equal to
+ 1/32nd (about 3%) of <xref linkend="guc-shared-buffers">, but not less
+ than <literal>64kB</literal> nor more than the size of one WAL
+ segment, typically <literal>16MB</literal>. This value can be set
+ manually if the automatic choice is too large or too small,
+ but any positive value less than <literal>32kB</literal> will be
+ treated as <literal>32kB</literal>.
+ This parameter can only be set at server start.
+ </para>
+
+ <para>
+ The contents of the WAL buffers are written out to disk at every
+ transaction commit, so extremely large values are unlikely to
+ provide a significant benefit. However, setting this value to at
+ least a few megabytes can improve write performance on a busy
+ server where many clients are committing at once. The auto-tuning
+ selected by the default setting of -1 should give reasonable
+ results in most cases.
</para>
<para>