pgsql: pgstat: add WAL receiver status view & SRF

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: pgstat: add WAL receiver status view & SRF
Date: 2016-01-07 19:36:55
Message-ID: E1aHGMh-00011K-98@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/b1a9bad9e744857291c7d5516080527da8219854

Modified Files
--------------
doc/src/sgml/monitoring.sgml | 91 +++++++++++++++++++
src/backend/catalog/system_views.sql | 16 ++++
src/backend/replication/walreceiver.c | 154 +++++++++++++++++++++++++++++++++
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_proc.h | 2 +
src/include/replication/walreceiver.h | 2 +
src/test/regress/expected/rules.out | 13 +++
7 files changed, 279 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2016-01-07 20:04:05 Re: [COMMITTERS] pgsql: Windows: Make pg_ctl reliably detect service status
Previous Message Tom Lane 2016-01-07 16:27:00 pgsql: Remove vestigial CHECK_FOR_INTERRUPTS call.