mirror of
https://github.com/postgres/postgres.git
synced 2025-06-29 10:41:53 +03:00
Track walsender state in shared memory and expose in pg_stat_replication
This commit is contained in:
@ -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),
|
||||
|
Reference in New Issue
Block a user