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

Commit995a9fb

Browse files
committed
Move variable increment to the end of the loop
This is less error prone and matches the placement of other codein the file.Justin PryzbyReviewed by Tom LaneDiscussion:https://www.postgresql.org/message-id/20221123172436.GJ11463@telsasoft.com
1 parentcca1863 commit995a9fb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎src/backend/utils/activity/backend_status.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,6 @@ pgstat_read_current_status(void)
842842
CHECK_FOR_INTERRUPTS();
843843
}
844844

845-
beentry++;
846845
/* Only valid entries get included into the local array */
847846
if (localentry->backendStatus.st_procpid>0)
848847
{
@@ -871,6 +870,8 @@ pgstat_read_current_status(void)
871870
#endif
872871
localNumBackends++;
873872
}
873+
874+
beentry++;
874875
}
875876

876877
/* Set the pointer only after completion of a valid table */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp