]> granicus.if.org Git - postgresql/commit
Allow I/O reliability checks using 16-bit checksums
authorSimon Riggs <simon@2ndQuadrant.com>
Fri, 22 Mar 2013 13:54:07 +0000 (13:54 +0000)
committerSimon Riggs <simon@2ndQuadrant.com>
Fri, 22 Mar 2013 13:54:07 +0000 (13:54 +0000)
commit96ef3b8ff1cf1950e897fd2f766d4bd9ef0d5d56
tree65849014627f4e211c6be8a4e9905b67694ed4ae
parente4a05c7512b23c8f48c186e685f2ef186374a20a
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.
40 files changed:
contrib/pg_upgrade/controldata.c
contrib/pg_upgrade/pg_upgrade.h
doc/src/sgml/config.sgml
doc/src/sgml/ref/initdb.sgml
src/backend/access/gist/gistget.c
src/backend/access/hash/hash.c
src/backend/access/heap/heapam.c
src/backend/access/heap/pruneheap.c
src/backend/access/heap/rewriteheap.c
src/backend/access/heap/visibilitymap.c
src/backend/access/nbtree/nbtinsert.c
src/backend/access/nbtree/nbtree.c
src/backend/access/nbtree/nbtsort.c
src/backend/access/nbtree/nbtutils.c
src/backend/access/rmgrdesc/xlogdesc.c
src/backend/access/spgist/spginsert.c
src/backend/access/transam/README
src/backend/access/transam/xlog.c
src/backend/bootstrap/bootstrap.c
src/backend/commands/matview.c
src/backend/commands/sequence.c
src/backend/commands/tablecmds.c
src/backend/commands/vacuumlazy.c
src/backend/storage/buffer/bufmgr.c
src/backend/storage/buffer/localbuf.c
src/backend/storage/freespace/README
src/backend/storage/freespace/freespace.c
src/backend/storage/freespace/fsmpage.c
src/backend/storage/page/bufpage.c
src/backend/utils/misc/guc.c
src/backend/utils/time/tqual.c
src/bin/initdb/initdb.c
src/bin/pg_controldata/pg_controldata.c
src/bin/pg_resetxlog/pg_resetxlog.c
src/include/access/heapam_xlog.h
src/include/access/visibilitymap.h
src/include/access/xlog.h
src/include/catalog/pg_control.h
src/include/storage/bufmgr.h
src/include/storage/bufpage.h