diff options
author | Simon Riggs <simon@2ndQuadrant.com> | 2013-03-22 13:54:07 +0000 |
---|---|---|
committer | Simon Riggs <simon@2ndQuadrant.com> | 2013-03-22 13:54:07 +0000 |
commit | 96ef3b8ff1cf1950e897fd2f766d4bd9ef0d5d56 (patch) | |
tree | 65849014627f4e211c6be8a4e9905b67694ed4ae /src/backend/utils/misc/guc.c | |
parent | e4a05c7512b23c8f48c186e685f2ef186374a20a (diff) | |
download | postgresql-96ef3b8ff1cf1950e897fd2f766d4bd9ef0d5d56.tar.gz postgresql-96ef3b8ff1cf1950e897fd2f766d4bd9ef0d5d56.zip |
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.
Diffstat (limited to 'src/backend/utils/misc/guc.c')
-rw-r--r-- | src/backend/utils/misc/guc.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index e1b65256a4f..22ba35fef93 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -122,6 +122,7 @@ extern int CommitDelay; extern int CommitSiblings; extern char *default_tablespace; extern char *temp_tablespaces; +extern bool ignore_checksum_failure; extern bool synchronize_seqscans; extern int ssl_renegotiation_limit; extern char *SSLCipherSuites; @@ -808,6 +809,21 @@ static struct config_bool ConfigureNamesBool[] = NULL, NULL, NULL }, { + {"ignore_checksum_failure", PGC_SUSET, DEVELOPER_OPTIONS, + gettext_noop("Continues processing after a checksum failure."), + gettext_noop("Detection of a checksum failure normally causes PostgreSQL to " + "report an error, aborting the current transaction. Setting " + "ignore_checksum_failure to true causes the system to ignore the failure " + "(but still report a warning), and continue processing. This " + "behavior could cause crashes or other serious problems. Only " + "has an effect if checksums are enabled."), + GUC_NOT_IN_SAMPLE + }, + &ignore_checksum_failure, + false, + NULL, NULL, NULL + }, + { {"zero_damaged_pages", PGC_SUSET, DEVELOPER_OPTIONS, gettext_noop("Continues processing past damaged page headers."), gettext_noop("Detection of a damaged page header normally causes PostgreSQL to " |