Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 8f9c461

Browse files
committed
Add a paragraph explaining what restartpoints are. Mention that
wal_keep_segments does not take effect during recovery. Fujii Masao
1 parent 7590ddb commit 8f9c461

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

doc/src/sgml/config.sgml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.294 2010/07/08 10:20:13 mha Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.295 2010/07/16 11:20:23 heikki Exp $ -->
22

33
<chapter Id="runtime-config">
44
<title>Server Configuration</title>
@@ -1926,7 +1926,8 @@ SET ENABLE_SEQSCAN TO OFF;
19261926
doesn't keep any extra segments for standby purposes, and the number
19271927
of old WAL segments available to standby servers is a function of
19281928
the location of the previous checkpoint and status of WAL
1929-
archiving. This parameter can only be set in the
1929+
archiving. This parameter has no effect on restartpoints.
1930+
This parameter can only be set in the
19301931
<filename>postgresql.conf</> file or on the server command line.
19311932
</para>
19321933
</listitem>

doc/src/sgml/wal.sgml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/wal.sgml,v 1.68 2010/07/08 16:44:12 momjian Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/wal.sgml,v 1.69 2010/07/16 11:20:23 heikki Exp $ -->
22

33
<chapter id="wal">
44
<title>Reliability and the Write-Ahead Log</title>
@@ -449,6 +449,7 @@
449449
<para>
450450
There will always be at least one WAL segment file, and will normally
451451
not be more than (2 + <varname>checkpoint_completion_target</varname>) * <varname>checkpoint_segments</varname> + 1
452+
or <varname>checkpoint_segments</> + <xref linkend="guc-wal-keep-segments"> + 1
452453
files. Each segment file is normally 16 MB (though this size can be
453454
altered when building the server). You can use this to estimate space
454455
requirements for <acronym>WAL</acronym>.
@@ -460,6 +461,22 @@
460461
of recycled until the system gets back under this limit.
461462
</para>
462463

464+
<para>
465+
In archive recovery or standby mode, the server periodically performs
466+
<firstterm>restartpoints</><indexterm><primary>restartpoint</></>
467+
which are similar to checkpoints in normal operation: the server forces
468+
all its state to disk, updates the <filename>pg_control</> file to
469+
indicate that the already-processed WAL data need not be scanned again,
470+
and then recycles any old log segment files in <filename>pg_xlog</>
471+
directory. A restartpoint is triggered if at least one checkpoint record
472+
has been replayed and <varname>checkpoint_timeout</> seconds have passed
473+
since last restartpoint. In standby mode, a restartpoint is also triggered
474+
if <varname>checkoint_segments</> log segments have been replayed since
475+
last restartpoint and at least one checkpoint record has been replayed.
476+
Restartpoints can't be performed more frequently than checkpoints in the
477+
master because restartpoints can only be performed at checkpoint records.
478+
</para>
479+
463480
<para>
464481
There are two commonly used internal <acronym>WAL</acronym> functions:
465482
<function>LogInsert</function> and <function>LogFlush</function>.

0 commit comments

Comments
 (0)