Skip to content

Commit 3511f80

Browse files
committed
Fix CountOtherDBBackends to process bgworkers to count prepared transactions
1 parent a30e917 commit 3511f80

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
@@ -3756,7 +3756,12 @@ CountOtherDBBackends(Oid databaseId, int *nbackends, int *nprepared)
37563756
else
37573757
{
37583758
if (proc->isBackgroundWorker)
3759+
{
3760+
if (proc->pid == 0)
3761+
(*nprepared)++;
3762+
37593763
continue; /* do not count background workers */
3764+
}
37603765
}
37613766

37623767
if (proc == MyProc)

0 commit comments

Comments
 (0)