diff --git a/src/backend/storage/ipc/procarray.c b/src/backend/storage/ipc/procarray.c index 47c1059cc7b..e344ceebd18 100644 --- a/src/backend/storage/ipc/procarray.c +++ b/src/backend/storage/ipc/procarray.c @@ -2285,9 +2285,8 @@ MinimumActiveBackends(int min) * free list and are recycled. Its contents are nonsense in that case, * but that's acceptable for this function. */ - if (proc == NULL) - continue; - + if (pgprocno == -1) + continue; /* do not count deleted entries */ if (proc == MyProc) continue; /* do not count myself */ if (pgxact->xid == InvalidTransactionId)