From 4c8e20f815cbdf043d6d27906fd85ae50c9e4870 Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Tue, 11 Jan 2011 21:25:28 +0100 Subject: Track walsender state in shared memory and expose in pg_stat_replication --- src/backend/replication/basebackup.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/backend/replication/basebackup.c') 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), -- cgit v1.2.3