|
1 |
| -<!-- $PostgreSQL: pgsql/doc/src/sgml/wal.sgml,v 1.29 2004/08/08 04:34:43 tgl Exp $ --> |
| 1 | +<!-- $PostgreSQL: pgsql/doc/src/sgml/wal.sgml,v 1.30 2004/11/15 04:35:57 neilc Exp $ --> |
2 | 2 |
|
3 | 3 | <chapter id="wal">
|
4 | 4 | <title>Write-Ahead Logging (<acronym>WAL</acronym>)</title>
|
|
104 | 104 | </para>
|
105 | 105 |
|
106 | 106 | <para>
|
107 |
| - <firstterm>Checkpoints</firstterm><indexterm><primary>checkpoint</></> are points in the sequence of |
108 |
| - transactions at which it is guaranteed that the data files have |
109 |
| - been updated with all information logged before the checkpoint. At |
110 |
| - checkpointtime, all dirty data pages are flushed to disk and a |
111 |
| - special checkpoint record is written to the log file. Asresult, in |
112 |
| - the event of a crash, therecoverer knows from what point in the |
113 |
| - log (known as the redo record) it should start the REDO operation, |
114 |
| - since any changes made to data files before thatrecord are already |
115 |
| - on disk. After a checkpoint has been made, any log segments written |
116 |
| - before the redo record are no longer needed and can be recycled or |
117 |
| - removed. (When <acronym>WAL</acronym> archiving is being done, the |
| 107 | + <firstterm>Checkpoints</firstterm><indexterm><primary>checkpoint</></> |
| 108 | +are points in the sequence oftransactions at which it is guaranteed |
| 109 | +that the data files havebeen updated with all information logged before |
| 110 | +thecheckpoint. At checkpointtime, all dirty data pages are flushed to |
| 111 | +disk and aspecial checkpoint record is written to the log file. Asa |
| 112 | +result, inthe event of a crash, thecrash recovery procedure knows from |
| 113 | +what point in thelog (known as the redo record) it should start the |
| 114 | +REDO operation,since any changes made to data files before thatpoint |
| 115 | +are alreadyon disk. After a checkpoint has been made, any log segments |
| 116 | +writtenbefore the redo record are no longer needed and can be recycled |
| 117 | +orremoved. (When <acronym>WAL</acronym> archiving is being done, the |
118 | 118 | log segments must be archived before being recycled or removed.)
|
119 | 119 | </para>
|
120 | 120 |
|
|