Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4950f09

Browse files
committed
Fix thinko when ending progress report for a backend
The logic ending progress reporting for a backend entry introduced byb6fb647 causes callers of pgstat_progress_end_command() to do some extrawork when track_activities is enabled as the process fields are reset inthe backend entry even if no command were started for reporting.This resets the fields only if a command is registered for progressreporting, and only if track_activities is enabled.Author: Masahiho SawadaDiscussion:https://postgr.es/m/CAD21AoCry_vJ0E-m5oxJXGL3pnos-xYGCzF95rK5Bbi3Uf-rpA@mail.gmail.comBackpatch-through: 9.6
1 parentdbbae33 commit4950f09

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎src/backend/postmaster/pgstat.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3181,10 +3181,10 @@ pgstat_progress_end_command(void)
31813181
{
31823182
volatilePgBackendStatus*beentry=MyBEEntry;
31833183

3184-
if (!beentry)
3184+
if (!beentry|| !pgstat_track_activities)
31853185
return;
3186-
if (!pgstat_track_activities
3187-
&&beentry->st_progress_command==PROGRESS_COMMAND_INVALID)
3186+
3187+
if (beentry->st_progress_command==PROGRESS_COMMAND_INVALID)
31883188
return;
31893189

31903190
PGSTAT_BEGIN_WRITE_ACTIVITY(beentry);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp