mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
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
This commit is contained in:
@@ -77,6 +77,7 @@ static SQLCmd *make_sqlcmd(void);
|
||||
%token K_MAX_RATE
|
||||
%token K_WAL
|
||||
%token K_TABLESPACE_MAP
|
||||
%token K_NOVERIFY_CHECKSUMS
|
||||
%token K_TIMELINE
|
||||
%token K_PHYSICAL
|
||||
%token K_LOGICAL
|
||||
@@ -154,7 +155,7 @@ var_name: IDENT { $$ = $1; }
|
||||
|
||||
/*
|
||||
* BASE_BACKUP [LABEL '<label>'] [PROGRESS] [FAST] [WAL] [NOWAIT]
|
||||
* [MAX_RATE %d] [TABLESPACE_MAP]
|
||||
* [MAX_RATE %d] [TABLESPACE_MAP] [NOVERIFY_CHECKSUMS]
|
||||
*/
|
||||
base_backup:
|
||||
K_BASE_BACKUP base_backup_opt_list
|
||||
@@ -208,6 +209,11 @@ base_backup_opt:
|
||||
$$ = makeDefElem("tablespace_map",
|
||||
(Node *)makeInteger(true), -1);
|
||||
}
|
||||
| K_NOVERIFY_CHECKSUMS
|
||||
{
|
||||
$$ = makeDefElem("noverify_checksums",
|
||||
(Node *)makeInteger(true), -1);
|
||||
}
|
||||
;
|
||||
|
||||
create_replication_slot:
|
||||
|
Reference in New Issue
Block a user