From 96ef3b8ff1cf1950e897fd2f766d4bd9ef0d5d56 Mon Sep 17 00:00:00 2001
From: Simon Riggs
Date: Fri, 22 Mar 2013 13:54:07 +0000
Subject: Allow I/O reliability checks using 16-bit checksums
Checksums are set immediately prior to flush out of shared buffers
and checked when pages are read in again. Hint bit setting will
require full page write when block is dirtied, which causes various
infrastructure changes. Extensive comments, docs and README.
WARNING message thrown if checksum fails on non-all zeroes page;
ERROR thrown but can be disabled with ignore_checksum_failure = on.
Feature enabled by an initdb option, since transition from option off
to option on is long and complex and has not yet been implemented.
Default is not to use checksums.
Checksum used is WAL CRC-32 truncated to 16-bits.
Simon Riggs, Jeff Davis, Greg Smith
Wide input and assistance from many community members. Thank you.
---
doc/src/sgml/config.sgml | 24 ++++++++++++++++++++++++
doc/src/sgml/ref/initdb.sgml | 14 ++++++++++++++
2 files changed, 38 insertions(+)
(limited to 'doc/src')
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index 8c520e1267b..95de86441e4 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -6629,6 +6629,30 @@ LOG: CleanUpLock: deleting: lock(0xb7acd844) id(24688,24696,0,0,0,1)
+
+ ignore_checksum_failure (boolean)
+
+ ignore_checksum_failure> configuration parameter
+
+
+
+ Only has effect if are enabled.
+
+
+ Detection of a checksum failure during a read normally causes
+ PostgreSQL> to report an error, aborting the current
+ transaction. Setting ignore_checksum_failure> to on causes
+ the system to ignore the failure (but still report a warning), and
+ continue processing. This behavior may cause crashes, propagate
+ or hide corruption, or other serious problems>. However, it may allow
+ you to get past the error and retrieve undamaged tuples that might still be
+ present in the table if the block header is still sane. If the header is
+ corrupt an error will be reported even if this option is enabled. The
+ default setting is off>, and it can only be changed by a superuser.
+
+
+
+
zero_damaged_pages (boolean)
diff --git a/doc/src/sgml/ref/initdb.sgml b/doc/src/sgml/ref/initdb.sgml
index a1e46eb4c67..b1067e23505 100644
--- a/doc/src/sgml/ref/initdb.sgml
+++ b/doc/src/sgml/ref/initdb.sgml
@@ -182,6 +182,20 @@ PostgreSQL documentation
+
+
+
+
+
+ Use checksums on data pages to help detect corruption by the
+ I/O system that would otherwise be silent. Enabling checksums
+ may incur a noticeable performance penalty. This option can only
+ be set during initialization, and cannot be changed later. If
+ set, checksums are calculated for all objects, in all databases.
+
+
+
+
--
cgit v1.2.3