Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c4c236a

Browse files
committed
Fix some comments related to IO workers
IO workers are treated as auxiliary processes. The comments fixed in this commit stated that there could be only one auxiliary process of each BackendType at the same time. This is not true for IO workers, as up to MAX_IO_WORKERS of them can co-exist at the same time. Author: Cédric Villemain <[email protected]> Co-authored-by: Michael Paquier <[email protected]> Discussion: https://postgr.es/m/[email protected]
1 parent 09a47c6 commit c4c236a

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/backend/storage/ipc/procsignal.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ struct ProcSignalHeader
8989
/*
9090
* We reserve a slot for each possible ProcNumber, plus one for each
9191
* possible auxiliary process type. (This scheme assumes there is not
92-
* more than one of any auxiliary process type at a time.)
92+
* more than one of any auxiliary process type at a time, except for
93+
* IO workers.)
9394
*/
9495
#define NumProcSignalSlots (MaxBackends + NUM_AUXILIARY_PROCS)
9596

src/backend/storage/ipc/sinvaladt.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,8 @@ typedef struct SISeg
198198
/*
199199
* We reserve a slot for each possible ProcNumber, plus one for each
200200
* possible auxiliary process type. (This scheme assumes there is not
201-
* more than one of any auxiliary process type at a time.)
201+
* more than one of any auxiliary process type at a time, except for
202+
* IO workers.)
202203
*/
203204
#define NumProcStateSlots (MaxBackends + NUM_AUXILIARY_PROCS)
204205

src/include/miscadmin.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ typedef enum BackendType
353353
* Auxiliary processes. These have PGPROC entries, but they are not
354354
* attached to any particular database, and cannot run transactions or
355355
* even take heavyweight locks. There can be only one of each of these
356-
* running at a time.
356+
* running at a time, except for IO workers.
357357
*
358358
* If you modify these, make sure to update NUM_AUXILIARY_PROCS and the
359359
* glossary in the docs.

0 commit comments

Comments
 (0)