pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Teach walsender to update its process title for replication comm
Date: Thu, 17 Sep 2020 01:06:56 +0000
Message-ID: <E1kIiO0-0000cr-Nf@gemulon.postgresql.org> (raw)

Teach walsender to update its process title for replication commands.

Because the code path taken for SQL commands executed in a walsender
will update the process title, we pretty much have to update the
title for replication commands as well.  Otherwise, the title shows
"idle" for the rest of a logical walsender's lifetime once it's
executed any SQL command.

Playing with this, I confirm that a walsender now typically spends
most of its life reporting
        walsender postgres [local] START_REPLICATION
Considering this in isolation, it might be better to have it say
        walsender postgres [local] sending replication data
However, consistency with the other cases seems to be a stronger
argument.

In passing, remove duplicative pgstat_report_activity call.

Discussion: https://postgr.es/m/880181.1600026471@sss.pgh.pa.us

Branch
------
master

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

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



Message-ID: <E1kIiO0-0000cr-Nf@gemulon.postgresql.org>
Permalink:  ../E1kIiO0-0000cr-Nf@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1kIiO0-0000cr-Nf@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: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Teach walsender to update its process title for replication comm
  In-Reply-To: <E1kIiO0-0000cr-Nf@gemulon.postgresql.org>
  References: <E1kIiO0-0000cr-Nf@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