pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Properly set base backup backends to active in pg_stat_activity
2+ messages / 1 participants
[nested] [flat]

* pgsql: Properly set base backup backends to active in pg_stat_activity
@ 2017-12-29 15:28  Magnus Hagander <magnus@hagander.net>
  0 siblings, 0 replies; 2+ messages in thread

From: Magnus Hagander @ 2017-12-29 15:28 UTC (permalink / raw)
  To: pgsql-committers

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.

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/b38c3d58ed6f43c14e1e0f78f82db0e60cc2fedb

Modified Files
--------------
src/backend/replication/walsender.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Properly set base backup backends to active in pg_stat_activity
@ 2017-12-29 15:28  Magnus Hagander <magnus@hagander.net>
  0 siblings, 0 replies; 2+ messages in thread

From: Magnus Hagander @ 2017-12-29 15:28 UTC (permalink / raw)
  To: pgsql-committers

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.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/d02974e32e028fc078d8f5eca1d6a4516efb0aa6

Modified Files
--------------
src/backend/replication/walsender.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2017-12-29 15:28 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-12-29 15:28 pgsql: Properly set base backup backends to active in pg_stat_activity Magnus Hagander <magnus@hagander.net>
2017-12-29 15:28 pgsql: Properly set base backup backends to active in pg_stat_activity Magnus Hagander <magnus@hagander.net>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox