projects
/
users
/
simon
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3ecd52e
)
Fix a thinko introduced into CountActiveBackends by a recent patch:
author
Tom Lane
<tgl@sss.pgh.pa.us>
Wed, 29 Jul 2009 15:57:11 +0000
(15:57 +0000)
committer
Tom Lane
<tgl@sss.pgh.pa.us>
Wed, 29 Jul 2009 15:57:11 +0000
(15:57 +0000)
we should ignore NULL array entries, not non-NULL ones. This had the
effect of disabling commit_delay, and could have caused a crash in the
rare race condition the patch was intended to fix.
Bug report and diagnosis by Jeff Janes, in bug #4952.
src/backend/storage/ipc/procarray.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/storage/ipc/procarray.c
b/src/backend/storage/ipc/procarray.c
index d2c01a06a5a99233b50e2234ca63dfb41c6f4dc2..d3b94e76fa6e7b4e02786e149a2a38f621fdeaa4 100644
(file)
--- a/
src/backend/storage/ipc/procarray.c
+++ b/
src/backend/storage/ipc/procarray.c
@@
-1137,7
+1137,7
@@
CountActiveBackends(void)
* free list and are recycled. Its contents are nonsense in that case,
* but that's acceptable for this function.
*/
- if (proc
!
= NULL)
+ if (proc
=
= NULL)
continue;
if (proc == MyProc)