pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Magnus Hagander <magnus@hagander.net>
To: pgsql-committers@postgresql.org
Subject: pgsql: Properly set base backup backends to active in pg_stat_activity
Date: Fri, 29 Dec 2017 15:28:51 +0000
Message-ID: <E1eUwaZ-000419-Ha@gemulon.postgresql.org> (raw)

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(-)



view thread (2+ messages)  latest in thread

Message-ID: <E1eUwaZ-000419-Ha@gemulon.postgresql.org>
Permalink:  ../E1eUwaZ-000419-Ha@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1eUwaZ-000419-Ha@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: magnus@hagander.net
  Subject: Re: pgsql: Properly set base backup backends to active in pg_stat_activity
  In-Reply-To: <E1eUwaZ-000419-Ha@gemulon.postgresql.org>
  References: <E1eUwaZ-000419-Ha@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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