|
177 | 177 | (BBU) disk controllers do not prevent partial page writes unless
|
178 | 178 | they guarantee that data is written to the BBU as full (8kB) pages.
|
179 | 179 | </para>
|
| 180 | + <para> |
| 181 | + <productname>PostgreSQL</> also protects against some kinds of data corruption |
| 182 | + on storage devices that may occur because of hardware errors or media failure over time, |
| 183 | + such as reading/writing garbage data. |
| 184 | + <itemizedlist> |
| 185 | + <listitem> |
| 186 | + <para> |
| 187 | + Each individual record in a WAL file is protected by a CRC-32 (32-bit) check |
| 188 | + that allows us to tell if record contents are correct. The CRC value |
| 189 | + is set when we write each WAL record and checked during crash recovery, |
| 190 | + archive recovery and replication. |
| 191 | + </para> |
| 192 | + </listitem> |
| 193 | + <listitem> |
| 194 | + <para> |
| 195 | + Data pages are not currently checksummed, though full page images recorded |
| 196 | + in WAL records will be protected. Data pages have a 16-bit field available |
| 197 | + for future use with a data page checksum feature. |
| 198 | + </para> |
| 199 | + </listitem> |
| 200 | + <listitem> |
| 201 | + <para> |
| 202 | + Internal data structures such as pg_clog, pg_subtrans, pg_multixact, |
| 203 | + pg_serial, pg_notify, pg_stat, pg_snapshots, pg_twophase are not directly |
| 204 | + checksummed, nor are pages protected by full page writes. However, where |
| 205 | + such data structures are persistent, WAL records are written that allow |
| 206 | + recent changes to be accurately rebuilt at crash recovery and those |
| 207 | + WAL records are protected as discussed above. |
| 208 | + </para> |
| 209 | + </listitem> |
| 210 | + <listitem> |
| 211 | + <para> |
| 212 | + Temporary data files used in larger SQL queries for sorts, |
| 213 | + materializations and intermediate results are not currently checksummed, |
| 214 | + nor will WAL records be written for changes to those files. |
| 215 | + </para> |
| 216 | + </listitem> |
| 217 | + </itemizedlist> |
| 218 | + </para> |
| 219 | + <para> |
| 220 | + <productname>PostgreSQL</> does not protect against correctable memory errors |
| 221 | + and it is assumed you will operate using RAM that uses industry standard |
| 222 | + Error Correcting Codes (ECC) or better protection. |
| 223 | + </para> |
180 | 224 | </sect1>
|
181 | 225 |
|
182 | 226 | <sect1 id="wal-intro">
|
|
0 commit comments