summaryrefslogtreecommitdiff
path: root/src/backend/replication/basebackup.c
diff options
context:
space:
mode:
authorMagnus Hagander <magnus@hagander.net>2011-01-11 21:25:28 +0100
committerMagnus Hagander <magnus@hagander.net>2011-01-11 21:25:28 +0100
commit4c8e20f815cbdf043d6d27906fd85ae50c9e4870 (patch)
treebae18c14b6b970108fffa0a1f27085b6e65dd0b1 /src/backend/replication/basebackup.c
parent47a5f3e9dab68f47ebadc759afb97b900c437c54 (diff)
Track walsender state in shared memory and expose in pg_stat_replication
Diffstat (limited to 'src/backend/replication/basebackup.c')
-rw-r--r--src/backend/replication/basebackup.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/backend/replication/basebackup.c b/src/backend/replication/basebackup.c
index c09700f7980..144b17c66b6 100644
--- a/src/backend/replication/basebackup.c
+++ b/src/backend/replication/basebackup.c
@@ -24,6 +24,7 @@
#include "libpq/pqformat.h"
#include "nodes/pg_list.h"
#include "replication/basebackup.h"
+#include "replication/walsender.h"
#include "storage/fd.h"
#include "storage/ipc.h"
#include "utils/builtins.h"
@@ -115,6 +116,8 @@ SendBaseBackup(const char *options)
ALLOCSET_DEFAULT_MAXSIZE);
old_context = MemoryContextSwitchTo(backup_context);
+ WalSndSetState(WALSNDSTATE_BACKUP);
+
if (backup_label == NULL)
ereport(FATAL,
(errcode(ERRCODE_PROTOCOL_VIOLATION),