pgsql: Validate page level checksums in base backups

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Validate page level checksums in base backups
Date: 2018-04-03 11:52:26
Message-ID: E1f3KUE-0003rM-6g@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Validate page level checksums in base backups

When base backups are run over the replication protocol (for example
using pg_basebackup), verify the checksums of all data blocks if
checksums are enabled. If checksum failures are encountered, log them
as warnings but don't abort the backup.

This becomes the default behaviour in pg_basebackup (provided checksums
are enabled on the server), so add a switch (-k) to disable the checks
if necessary.

Author: Michael Banck
Reviewed-By: Magnus Hagander, David Steele
Discussion: https://postgr.es/m/20180228180856.GE13784@nighthawk.caipicrew.dd-dns.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/4eb77d50c21ddd35b77421c27e0d7853eb4f9202

Modified Files
--------------
doc/src/sgml/protocol.sgml | 13 +-
doc/src/sgml/ref/pg_basebackup.sgml | 16 ++
src/backend/replication/basebackup.c | 227 ++++++++++++++++++++++++++-
src/backend/replication/repl_gram.y | 8 +-
src/backend/replication/repl_scanner.l | 1 +
src/bin/pg_basebackup/pg_basebackup.c | 38 ++++-
src/bin/pg_basebackup/t/010_pg_basebackup.pl | 62 +++++++-
7 files changed, 352 insertions(+), 13 deletions(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Magnus Hagander 2018-04-03 11:58:46 pgsql: Fix for checksum validation patch
Previous Message Simon Riggs 2018-04-03 11:19:41 pgsql: Tab completion for MERGE

Browse pgsql-hackers by date

  From Date Subject
Next Message Arthur Zakirov 2018-04-03 11:57:22 Re: [PROPOSAL] Shared Ispell dictionaries
Previous Message Magnus Hagander 2018-04-03 11:52:21 Re: [PATCH] Verify Checksums during Basebackups