diff options
author | Magnus Hagander <magnus@hagander.net> | 2018-04-05 21:57:26 +0200 |
---|---|---|
committer | Magnus Hagander <magnus@hagander.net> | 2018-04-05 22:04:48 +0200 |
commit | 1fde38beaa0c3e66c340efc7cc0dc272d6254bb0 (patch) | |
tree | 1e8291cd8523789d919e239e92aa3ecd6aa749de /src/backend/replication/logical/decode.c | |
parent | c39e903d510064e4415bbadb43e34f6998351cca (diff) | |
download | postgresql-1fde38beaa0c3e66c340efc7cc0dc272d6254bb0.tar.gz postgresql-1fde38beaa0c3e66c340efc7cc0dc272d6254bb0.zip |
Allow on-line enabling and disabling of data checksums
This makes it possible to turn checksums on in a live cluster, without
the previous need for dump/reload or logical replication (and to turn it
off).
Enabling checkusm starts a background process in the form of a
launcher/worker combination that goes through the entire database and
recalculates checksums on each and every page. Only when all pages have
been checksummed are they fully enabled in the cluster. Any failure of
the process will revert to checksums off and the process has to be
started.
This adds a new WAL record that indicates the state of checksums, so
the process works across replicated clusters.
Authors: Magnus Hagander and Daniel Gustafsson
Review: Tomas Vondra, Michael Banck, Heikki Linnakangas, Andrey Borodin
Diffstat (limited to 'src/backend/replication/logical/decode.c')
-rw-r--r-- | src/backend/replication/logical/decode.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/backend/replication/logical/decode.c b/src/backend/replication/logical/decode.c index 6eb0d5527e0..84183f82031 100644 --- a/src/backend/replication/logical/decode.c +++ b/src/backend/replication/logical/decode.c @@ -198,6 +198,7 @@ DecodeXLogOp(LogicalDecodingContext *ctx, XLogRecordBuffer *buf) case XLOG_FPW_CHANGE: case XLOG_FPI_FOR_HINT: case XLOG_FPI: + case XLOG_CHECKSUMS: break; default: elog(ERROR, "unexpected RM_XLOG_ID record type: %u", info); |