postgres.git / summary / log / commit / refs
commit fc3d4a44e9375f79709f470cb3c83d4ca28fb370
Author: Simon Riggs <simon@2ndQuadrant.com>
Date: Mon Sep 12 07:57:14 2016 +0000
First released in: 10.0
Identify walsenders in pg_stat_activity
Following 8299471c37fff0b walsender procs are now visible in pg_stat_activity.
Set query to ‘walsender’ for walsender procs to allow them to be identified.
Discussion:CAB7nPqS8c76KPSufK_HSDeYrbtg+zZ7D0EEkjeM6txSEuCB_jA@mail.gmail.com
Michael Paquier, issue raised by Fujii Masao, reviewed by Tom Lane
src/backend/replication/walsender.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/backend/replication/walsender.c b/src/backend/replication/walsender.c
index 1ea2a5cfdf1..c7743da034a 100644
--- a/src/backend/replication/walsender.c
+++ b/src/backend/replication/walsender.c
@@ -1806,6 +1806,9 @@ WalSndLoop(WalSndSendDataCallback send_data)
last_reply_timestamp = GetCurrentTimestamp();
waiting_for_ping_response = false;
+ /* Report to pgstat that this process is a WAL sender */
+ pgstat_report_activity(STATE_RUNNING, "walsender");
+
/*
* Loop until we reach the end of this timeline or the client requests to
* stop streaming.
[parent: c3c0d7bd701d]