pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix thinko when ending progress report for a backend
Date: Wed, 04 Sep 2019 06:47:59 +0000
Message-ID: <E1i5P5D-0006Iu-5B@gemulon.postgresql.org> (raw)

Fix thinko when ending progress report for a backend

The logic ending progress reporting for a backend entry introduced by
b6fb647 causes callers of pgstat_progress_end_command() to do some extra
work when track_activities is enabled as the process fields are reset in
the backend entry even if no command were started for reporting.

This resets the fields only if a command is registered for progress
reporting, and only if track_activities is enabled.

Author: Masahiho Sawada
Discussion: https://postgr.es/m/CAD21AoCry_vJ0E-m5oxJXGL3pnos-xYGCzF95rK5Bbi3Uf-rpA@mail.gmail.com
Backpatch-through: 9.6

Branch
------
REL9_6_STABLE

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

Modified Files
--------------
src/backend/postmaster/pgstat.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)



view thread (5+ messages)

Message-ID: <E1i5P5D-0006Iu-5B@gemulon.postgresql.org>
Permalink:  ../E1i5P5D-0006Iu-5B@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1i5P5D-0006Iu-5B@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: michael@paquier.xyz
  Subject: Re: pgsql: Fix thinko when ending progress report for a backend
  In-Reply-To: <E1i5P5D-0006Iu-5B@gemulon.postgresql.org>
  References: <E1i5P5D-0006Iu-5B@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