Add WAL consistency checking facility.
authorRobert Haas <rhaas@postgresql.org>
Wed, 8 Feb 2017 20:45:30 +0000 (15:45 -0500)
committerRobert Haas <rhaas@postgresql.org>
Wed, 8 Feb 2017 20:45:30 +0000 (15:45 -0500)
commita507b86900f695aacc8d52b7d2cfcb65f58862a2
tree1cc25aaddb8613d2744e803e3ea970fd50d1e309
parent115cb31597fac8a17202d1e41da8baf33fcb60cf
Add WAL consistency checking facility.

When the new GUC wal_consistency_checking is set to a non-empty value,
it triggers recording of additional full-page images, which are
compared on the standby against the results of applying the WAL record
(without regard to those full-page images).  Allowable differences
such as hints are masked out, and the resulting pages are compared;
any difference results in a FATAL error on the standby.

Kuntal Ghosh, based on earlier patches by Michael Paquier and Heikki
Linnakangas.  Extensively reviewed and revised by Michael Paquier and
by me, with additional reviews and comments from Amit Kapila, Álvaro
Herrera, Simon Riggs, and Peter Eisentraut.
36 files changed:
doc/src/sgml/config.sgml
src/backend/access/brin/brin_xlog.c
src/backend/access/common/Makefile
src/backend/access/common/bufmask.c [new file with mode: 0644]
src/backend/access/gin/ginxlog.c
src/backend/access/gist/gistxlog.c
src/backend/access/heap/heapam.c
src/backend/access/nbtree/nbtxlog.c
src/backend/access/rmgrdesc/gindesc.c
src/backend/access/spgist/spgxlog.c
src/backend/access/transam/generic_xlog.c
src/backend/access/transam/rmgr.c
src/backend/access/transam/xlog.c
src/backend/access/transam/xloginsert.c
src/backend/access/transam/xlogreader.c
src/backend/access/transam/xlogutils.c
src/backend/commands/sequence.c
src/backend/utils/misc/guc.c
src/bin/pg_rewind/parsexlog.c
src/bin/pg_xlogdump/pg_xlogdump.c
src/bin/pg_xlogdump/rmgrdesc.c
src/include/access/brin_xlog.h
src/include/access/bufmask.h [new file with mode: 0644]
src/include/access/generic_xlog.h
src/include/access/gin.h
src/include/access/gist_private.h
src/include/access/heapam_xlog.h
src/include/access/nbtree.h
src/include/access/rmgr.h
src/include/access/rmgrlist.h
src/include/access/spgist.h
src/include/access/xlog.h
src/include/access/xlog_internal.h
src/include/access/xlogreader.h
src/include/access/xlogrecord.h
src/include/commands/sequence.h