mirror of
https://github.com/postgres/postgres.git
synced 2025-09-03 15:22:11 +03:00
Allow BASE_BACKUP to be throttled
A new MAX_RATE option allows imposing a limit to the network transfer rate from the server side. This is useful to limit the stress that taking a base backup has on the server. pg_basebackup is now able to specify a value to the server, too. Author: Antonin Houska Patch reviewed by Stefan Radomski, Andres Freund, Zoltán Böszörményi, Fujii Masao, and Álvaro Herrera.
This commit is contained in:
@@ -69,6 +69,7 @@ Node *replication_parse_result;
|
||||
%token K_PROGRESS
|
||||
%token K_FAST
|
||||
%token K_NOWAIT
|
||||
%token K_MAX_RATE
|
||||
%token K_WAL
|
||||
%token K_TIMELINE
|
||||
%token K_PHYSICAL
|
||||
@@ -113,7 +114,7 @@ identify_system:
|
||||
;
|
||||
|
||||
/*
|
||||
* BASE_BACKUP [LABEL '<label>'] [PROGRESS] [FAST] [WAL] [NOWAIT]
|
||||
* BASE_BACKUP [LABEL '<label>'] [PROGRESS] [FAST] [WAL] [NOWAIT] [MAX_RATE %d]
|
||||
*/
|
||||
base_backup:
|
||||
K_BASE_BACKUP base_backup_opt_list
|
||||
@@ -157,6 +158,11 @@ base_backup_opt:
|
||||
$$ = makeDefElem("nowait",
|
||||
(Node *)makeInteger(TRUE));
|
||||
}
|
||||
| K_MAX_RATE UCONST
|
||||
{
|
||||
$$ = makeDefElem("max_rate",
|
||||
(Node *)makeInteger($2));
|
||||
}
|
||||
;
|
||||
|
||||
/* CREATE_REPLICATION_SLOT SLOT slot PHYSICAL */
|
||||
|
Reference in New Issue
Block a user