Skip to content

Commit 28851e0

Browse files
committed
Fix CountOtherDBBackends to process bgworkers to count prepared transactions
1 parent 6c1125c commit 28851e0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/backend/storage/ipc/procarray.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3806,7 +3806,12 @@ CountOtherDBBackends(Oid databaseId, int *nbackends, int *nprepared)
38063806
else
38073807
{
38083808
if (proc->isBackgroundWorker)
3809+
{
3810+
if (proc->pid == 0)
3811+
(*nprepared)++;
3812+
38093813
continue; /* do not count background workers */
3814+
}
38103815
}
38113816

38123817
if (proc == MyProc)

0 commit comments

Comments
 (0)