Identify walsenders in pg_stat_activity

Following 8299471c37 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
This commit is contained in:
Simon Riggs 2016-09-12 08:57:14 +01:00
parent c3c0d7bd70
commit fc3d4a44e9
1 changed files with 3 additions and 0 deletions

View File

@ -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.