diff options
author | Simon Riggs <simon@2ndQuadrant.com> | 2016-09-12 08:57:14 +0100 |
---|---|---|
committer | Simon Riggs <simon@2ndQuadrant.com> | 2016-09-12 08:57:14 +0100 |
commit | fc3d4a44e9375f79709f470cb3c83d4ca28fb370 (patch) | |
tree | 14cb13bd991ed6f895acdb4cde3f66a23b79ba81 | |
parent | c3c0d7bd701dae4737c974a59ffa9b366110f9c1 (diff) | |
download | postgresql-fc3d4a44e9375f79709f470cb3c83d4ca28fb370.tar.gz postgresql-fc3d4a44e9375f79709f470cb3c83d4ca28fb370.zip |
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
-rw-r--r-- | src/backend/replication/walsender.c | 3 |
1 files changed, 3 insertions, 0 deletions
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. |