aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Hagander <magnus@hagander.net>2011-01-10 21:50:10 +0100
committerMagnus Hagander <magnus@hagander.net>2011-01-10 21:53:18 +0100
commit2e36343f82377fbb50834bba6557f8f243fecb34 (patch)
treecca80c8622beb6e4415f180d4acbed0375e0575d
parentdc1305ce5ffef157410b6e0171d71fa16da4cc9e (diff)
downloadpostgresql-2e36343f82377fbb50834bba6557f8f243fecb34.tar.gz
postgresql-2e36343f82377fbb50834bba6557f8f243fecb34.zip
Set process title to indicate base backup is running
-rw-r--r--src/backend/replication/basebackup.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/backend/replication/basebackup.c b/src/backend/replication/basebackup.c
index 5cb395d818e..de5fa2209bd 100644
--- a/src/backend/replication/basebackup.c
+++ b/src/backend/replication/basebackup.c
@@ -29,6 +29,7 @@
#include "utils/builtins.h"
#include "utils/elog.h"
#include "utils/memutils.h"
+#include "utils/ps_status.h"
static int64 sendDir(char *path, int basepathlen, bool sizeonly);
static void sendFile(char *path, int basepathlen, struct stat * statbuf);
@@ -96,6 +97,15 @@ SendBaseBackup(const char *options)
(errcode(ERRCODE_PROTOCOL_VIOLATION),
errmsg("invalid base backup options: %s", options)));
+ if (update_process_title)
+ {
+ char activitymsg[50];
+
+ snprintf(activitymsg, sizeof(activitymsg), "sending backup \"%s\"",
+ backup_label);
+ set_ps_display(activitymsg, false);
+ }
+
/* Make sure we can open the directory with tablespaces in it */
dir = AllocateDir("pg_tblspc");
if (!dir)