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

Commitae060a5

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 parent522baf1 commitae060a5

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
@@ -3272,10 +3272,10 @@ pgstat_progress_end_command(void)
32723272
{
32733273
volatilePgBackendStatus*beentry=MyBEEntry;
32743274

3275-
if (!beentry)
3275+
if (!beentry|| !pgstat_track_activities)
32763276
return;
3277-
if (!pgstat_track_activities
3278-
&&beentry->st_progress_command==PROGRESS_COMMAND_INVALID)
3277+
3278+
if (beentry->st_progress_command==PROGRESS_COMMAND_INVALID)
32793279
return;
32803280

32813281
PGSTAT_BEGIN_WRITE_ACTIVITY(beentry);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp