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

Commit8504905

Browse files
committed
Fix a thinko introduced into CountActiveBackends by a recent patch:
we should ignore NULL array entries, not non-NULL ones. This had theeffect of disabling commit_delay, and could have caused a crash in therare race condition the patch was intended to fix.Bug report and diagnosis by Jeff Janes, in bug #4952.
1 parent49475aa commit8504905

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/backend/storage/ipc/procarray.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
*
2424
*
2525
* IDENTIFICATION
26-
* $PostgreSQL: pgsql/src/backend/storage/ipc/procarray.c,v 1.50 2009/06/11 14:49:02 momjian Exp $
26+
* $PostgreSQL: pgsql/src/backend/storage/ipc/procarray.c,v 1.51 2009/07/29 15:57:11 tgl Exp $
2727
*
2828
*-------------------------------------------------------------------------
2929
*/
@@ -1137,7 +1137,7 @@ CountActiveBackends(void)
11371137
* free list and are recycled. Its contents are nonsense in that case,
11381138
* but that's acceptable for this function.
11391139
*/
1140-
if (proc!=NULL)
1140+
if (proc==NULL)
11411141
continue;
11421142

11431143
if (proc==MyProc)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp