projects
/
users
/
rhaas
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cca1863
)
Move variable increment to the end of the loop
author
John Naylor
<
[email protected]
>
Tue, 20 Dec 2022 07:13:14 +0000
(14:13 +0700)
committer
John Naylor
<
[email protected]
>
Tue, 20 Dec 2022 07:13:14 +0000
(14:13 +0700)
This is less error prone and matches the placement of other code
in the file.
Justin Pryzby
Reviewed by Tom Lane
Discussion: https://www.postgresql.org/message-id/
20221123172436
[email protected]
src/backend/utils/activity/backend_status.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/utils/activity/backend_status.c
b/src/backend/utils/activity/backend_status.c
index 7ecf467b8cde9245c369c8002cf3438b19639043..cf5582caf25eab84accaf05d4538c96a4ca8d401 100644
(file)
--- a/
src/backend/utils/activity/backend_status.c
+++ b/
src/backend/utils/activity/backend_status.c
@@
-842,7
+842,6
@@
pgstat_read_current_status(void)
CHECK_FOR_INTERRUPTS();
}
- beentry++;
/* Only valid entries get included into the local array */
if (localentry->backendStatus.st_procpid > 0)
{
@@
-871,6
+870,8
@@
pgstat_read_current_status(void)
#endif
localNumBackends++;
}
+
+ beentry++;
}
/* Set the pointer only after completion of a valid table */