diff options
author | Tom Lane | 2009-07-29 15:57:11 +0000 |
---|---|---|
committer | Tom Lane | 2009-07-29 15:57:11 +0000 |
commit | 2ffae8405d8d2578af0625350c46bf4919455452 (patch) | |
tree | 0e1a1a029fa3c5fa71128c963cb25784217ddd91 | |
parent | 3ecd52edf64995b40f8069f9d480fe1a7e563472 (diff) |
Fix a thinko introduced into CountActiveBackends by a recent patch:
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.
-rw-r--r-- | src/backend/storage/ipc/procarray.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/storage/ipc/procarray.c b/src/backend/storage/ipc/procarray.c index d2c01a06a5..d3b94e76fa 100644 --- 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) |