|
1 |
| -<!-- $PostgreSQL: pgsql/doc/src/sgml/wal.sgml,v 1.58 2009/01/15 00:34:25 momjian Exp $ --> |
| 1 | +<!-- $PostgreSQL: pgsql/doc/src/sgml/wal.sgml,v 1.59 2009/04/09 16:20:50 momjian Exp $ --> |
2 | 2 |
|
3 | 3 | <chapter id="wal">
|
4 | 4 | <title>Reliability and the Write-Ahead Log</title>
|
|
326 | 326 | are points in the sequence of transactions at which it is guaranteed
|
327 | 327 | that the data files have been updated with all information written before
|
328 | 328 | the checkpoint. At checkpoint time, all dirty data pages are flushed to
|
329 |
| - disk and a special checkpoint record is written to the log file. |
| 329 | + disk and a special checkpoint record is written to the log file. |
| 330 | + (The changes were previously flushed to the <acronym>WAL</acronym> files.) |
330 | 331 | In the event of a crash, the crash recovery procedure looks at the latest
|
331 | 332 | checkpoint record to determine the point in the log (known as the redo
|
332 | 333 | record) from which it should start the REDO operation. Any changes made to
|
333 |
| - data files before that point are known to be already on disk. Hence, after |
334 |
| - a checkpoint has been made, any log segments preceding the one containing |
| 334 | + data files before that point are guaranteed to be already on disk. Hence, after |
| 335 | + a checkpoint, log segments preceding the one containing |
335 | 336 | the redo record are no longer needed and can be recycled or removed. (When
|
336 | 337 | <acronym>WAL</acronym> archiving is being done, the log segments must be
|
337 | 338 | archived before being recycled or removed.)
|
338 | 339 | </para>
|
339 | 340 |
|
| 341 | + <para> |
| 342 | + The checkpoint requirement of flushing all dirty data pages to disk |
| 343 | + can cause a significant I/O load. For this reason, checkpoint |
| 344 | + activity is throttled so I/O begins at checkpoint start and completes |
| 345 | + before the next checkpoint starts; this minimizes performance |
| 346 | + degradation during checkpoints. |
| 347 | + </para> |
| 348 | + |
340 | 349 | <para>
|
341 | 350 | The server's background writer process will automatically perform
|
342 | 351 | a checkpoint every so often. A checkpoint is created every <xref
|
|
0 commit comments