diff options
| author | Alvaro Herrera | 2016-01-07 19:21:19 +0000 |
|---|---|---|
| committer | Alvaro Herrera | 2016-01-07 19:21:19 +0000 |
| commit | b1a9bad9e744857291c7d5516080527da8219854 (patch) | |
| tree | c93c41509990055a20dc91775dadba3c1e6c995a /src/include/replication | |
| parent | 6b1a837f69d00d265bee4b57ba2d320f1463f131 (diff) | |
pgstat: add WAL receiver status view & SRF
This new view provides insight into the state of a running WAL receiver
in a HOT standby node.
The information returned includes the PID of the WAL receiver process,
its status (stopped, starting, streaming, etc), start LSN and TLI, last
received LSN and TLI, timestamp of last message send and receipt, latest
end-of-WAL LSN and time, and the name of the slot (if any).
Access to the detailed data is only granted to superusers; others only
get the PID.
Author: Michael Paquier
Reviewer: Haribabu Kommi
Diffstat (limited to 'src/include/replication')
| -rw-r--r-- | src/include/replication/walreceiver.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/include/replication/walreceiver.h b/src/include/replication/walreceiver.h index db40d9d7603..6eacb095d1b 100644 --- a/src/include/replication/walreceiver.h +++ b/src/include/replication/walreceiver.h @@ -14,6 +14,7 @@ #include "access/xlog.h" #include "access/xlogdefs.h" +#include "fmgr.h" #include "storage/latch.h" #include "storage/spin.h" #include "pgtime.h" @@ -148,6 +149,7 @@ extern PGDLLIMPORT walrcv_disconnect_type walrcv_disconnect; /* prototypes for functions in walreceiver.c */ extern void WalReceiverMain(void) pg_attribute_noreturn(); +extern Datum pg_stat_get_wal_receiver(PG_FUNCTION_ARGS); /* prototypes for functions in walreceiverfuncs.c */ extern Size WalRcvShmemSize(void); |
