summaryrefslogtreecommitdiff
path: root/src/include/replication
diff options
context:
space:
mode:
authorAlvaro Herrera2014-02-27 21:55:57 +0000
committerAlvaro Herrera2014-02-27 21:55:57 +0000
commitef5856fd9b77ef9d0d0c31fb314bb61bbfb1d704 (patch)
tree84d8474fbe8a9b5d2439fa7f294032ce42101b04 /src/include/replication
parent1161d895d826950cbb736e5872935f3f53cc2e27 (diff)
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.
Diffstat (limited to 'src/include/replication')
-rw-r--r--src/include/replication/basebackup.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/include/replication/basebackup.h b/src/include/replication/basebackup.h
index 4e3e5f35c68..3dbc4bc9ef8 100644
--- a/src/include/replication/basebackup.h
+++ b/src/include/replication/basebackup.h
@@ -14,6 +14,13 @@
#include "nodes/replnodes.h"
+/*
+ * Minimum and maximum values of MAX_RATE option in BASE_BACKUP command.
+ */
+#define MAX_RATE_LOWER 32
+#define MAX_RATE_UPPER 1048576
+
+
extern void SendBaseBackup(BaseBackupCmd *cmd);
#endif /* _BASEBACKUP_H */