summaryrefslogtreecommitdiff
path: root/src/backend/storage/ipc/procarray.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2024-12-28 16:21:54 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2024-12-28 16:21:54 -0500
commit508a97ee4984597ea60c383f52adefd47178189f (patch)
tree544b2f40f0fd76f4fd910c3dd2cbaef2397c15b4 /src/backend/storage/ipc/procarray.c
parent34486b6092e700089d22586df211c4e8b0412136 (diff)
Replace PGPROC.isBackgroundWorker with isRegularBackend.
Commit 34486b609 effectively redefined isBackgroundWorker as meaning "not a regular backend", whereas before it had the narrower meaning of AmBackgroundWorkerProcess(). For clarity, rename the field to isRegularBackend and invert its sense. Discussion: https://postgr.es/m/1808397.1735156190@sss.pgh.pa.us
Diffstat (limited to 'src/backend/storage/ipc/procarray.c')
-rw-r--r--src/backend/storage/ipc/procarray.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/storage/ipc/procarray.c b/src/backend/storage/ipc/procarray.c
index a640b6f5f78..3f8764da852 100644
--- a/src/backend/storage/ipc/procarray.c
+++ b/src/backend/storage/ipc/procarray.c
@@ -3640,8 +3640,8 @@ CountDBConnections(Oid databaseid)
if (proc->pid == 0)
continue; /* do not count prepared xacts */
- if (proc->isBackgroundWorker)
- continue; /* do not count background workers */
+ if (!proc->isRegularBackend)
+ continue; /* count only regular backend processes */
if (!OidIsValid(databaseid) ||
proc->databaseId == databaseid)
count++;
@@ -3712,8 +3712,8 @@ CountUserBackends(Oid roleid)
if (proc->pid == 0)
continue; /* do not count prepared xacts */
- if (proc->isBackgroundWorker)
- continue; /* do not count background workers */
+ if (!proc->isRegularBackend)
+ continue; /* count only regular backend processes */
if (proc->roleId == roleid)
count++;
}