]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix thinko when ending progress report for a backend
authorMichael Paquier <michael@paquier.xyz>
Wed, 4 Sep 2019 06:46:49 +0000 (15:46 +0900)
committerMichael Paquier <michael@paquier.xyz>
Wed, 4 Sep 2019 06:46:49 +0000 (15:46 +0900)
commitaf28744288b1de46615c947be69935c2172374c7
treec34c838338045079ec693b2df331bf705d46c08c
parent996c92b27dfe5e36702f3a5a06c883b76be98705
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
src/backend/postmaster/pgstat.c