Skip to content

Commit ef4c35b

Browse files
committed
Fix outdated comment; all running bgworkers are in BackendList
Before commit 8a02b3d, only bgworkers that connected to a database had an entry in the Backendlist. Commit 8a02b3d changed that, but forgot to update this comment. Discussion: https://www.postgresql.org/message-id/835232c0-a5f7-4f20-b95b-5b56ba57d741@iki.fi
1 parent 3188a45 commit ef4c35b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/include/postmaster/bgworker_internals.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@
2626
/*
2727
* List of background workers, private to postmaster.
2828
*
29-
* A worker that requests a database connection during registration will have
30-
* rw_backend set, and will be present in BackendList. Note: do not rely on
31-
* rw_backend being non-NULL for shmem-connected workers!
29+
* All workers that are currently running will have rw_backend set, and will
30+
* be present in BackendList.
3231
*/
3332
typedef struct RegisteredBgWorker
3433
{
3534
BackgroundWorker rw_worker; /* its registry entry */
36-
struct bkend *rw_backend; /* its BackendList entry, or NULL */
35+
struct bkend *rw_backend; /* its BackendList entry, or NULL if not
36+
* running */
3737
pid_t rw_pid; /* 0 if not running */
3838
int rw_child_slot;
3939
TimestampTz rw_crashed_at; /* if not 0, time it last crashed */

0 commit comments

Comments
 (0)