mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Create a new dedicated Postgres process, "wal writer", which exists to write
and fsync WAL at convenient intervals. For the moment it just tries to offload this work from backends, but soon it will be responsible for guaranteeing a maximum delay before asynchronously-committed transactions will be flushed to disk. This is a portion of Simon Riggs' async-commit patch, committed to CVS separately because a background WAL writer seems like it might be a good idea independently of the async-commit feature. I rebased walwriter.c on bgwriter.c because it seemed like a more appropriate way of handling signals; while the startup/shutdown logic in postmaster.c is more like autovac because we want walwriter to quit before we start the shutdown checkpoint.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.132 2007/07/24 01:53:55 alvherre Exp $ -->
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.133 2007/07/24 04:54:08 tgl Exp $ -->
|
||||
|
||||
<chapter Id="runtime-config">
|
||||
<title>Server Configuration</title>
|
||||
@ -1413,7 +1413,7 @@ SET ENABLE_SEQSCAN TO OFF;
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry id="guc-wal-buffers" xreflabel="wal_buffers">
|
||||
<term><varname>wal_buffers</varname> (<type>integer</type>)</term>
|
||||
<indexterm>
|
||||
@ -1438,7 +1438,27 @@ SET ENABLE_SEQSCAN TO OFF;
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry id="guc-wal-writer-delay" xreflabel="wal_writer_delay">
|
||||
<term><varname>wal_writer_delay</varname> (<type>integer</type>)</term>
|
||||
<indexterm>
|
||||
<primary><varname>wal_writer_delay</> configuration parameter</primary>
|
||||
</indexterm>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the delay between activity rounds for the WAL writer.
|
||||
In each round the writer will flush WAL to disk. It then sleeps for
|
||||
<varname>wal_writer_delay</> milliseconds, and repeats. The default
|
||||
value is 200 milliseconds (<literal>200ms</>). Note that on many
|
||||
systems, the effective resolution of sleep delays is 10 milliseconds;
|
||||
setting <varname>wal_writer_delay</> to a value that is not a multiple
|
||||
of 10 might have the same results as setting it to the next higher
|
||||
multiple of 10. This parameter can only be set in the
|
||||
<filename>postgresql.conf</> file or on the server command line.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="guc-commit-delay" xreflabel="commit_delay">
|
||||
<term><varname>commit_delay</varname> (<type>integer</type>)</term>
|
||||
<indexterm>
|
||||
@ -1521,7 +1541,7 @@ SET ENABLE_SEQSCAN TO OFF;
|
||||
</indexterm>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the target length of checkpoints, as a fraction of
|
||||
Specifies the target length of checkpoints, as a fraction of
|
||||
the checkpoint interval. The default is 0.5.
|
||||
|
||||
This parameter can only be set in the <filename>postgresql.conf</>
|
||||
|
Reference in New Issue
Block a user