]> granicus.if.org Git - postgresql/commit
Properly set base backup backends to active in pg_stat_activity
authorMagnus Hagander <magnus@hagander.net>
Fri, 29 Dec 2017 15:19:51 +0000 (16:19 +0100)
committerMagnus Hagander <magnus@hagander.net>
Fri, 29 Dec 2017 15:28:32 +0000 (16:28 +0100)
commitd02974e32e028fc078d8f5eca1d6a4516efb0aa6
tree1b2a2114bba40a290a11251bb3838665e2825e4c
parent48c9f4926562278a2fd2b85e7486c6d11705f177
Properly set base backup backends to active in pg_stat_activity

When walsenders were included in pg_stat_activity, only the ones
actually streaming WAL were listed as active when they were active. In
particular, the connections sending base backups were listed as being
idle. Which means that a regular pg_basebackup would show up with one
active and one idle connection, when both were active.

This patch updates to set all walsenders to active when they are
(including those doing very fast things like IDENTIFY_SYSTEM), and then
back to idle. Details about exactly what they are doing is available in
pg_stat_replication.

Patch by me, review by Michael Paquier and David Steele.
src/backend/replication/walsender.c