Fix some comments related to IO workers
authorMichael Paquier <michael@paquier.xyz>
Wed, 7 May 2025 05:55:57 +0000 (14:55 +0900)
committerMichael Paquier <michael@paquier.xyz>
Wed, 7 May 2025 05:55:57 +0000 (14:55 +0900)
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 <Cedric.Villemain@data-bene.io>
Co-authored-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/e4a3ac45-abce-4b58-a043-b4a31cd11113@Data-Bene.io

src/backend/storage/ipc/procsignal.c
src/backend/storage/ipc/sinvaladt.c
src/include/miscadmin.h

index a3c2cd12277335d49e05e7c47b5364e50e4b5e7f..1a4cc5e5d978eefa1d2818207f9203102db3f148 100644 (file)
@@ -89,7 +89,8 @@ struct ProcSignalHeader
 /*
  * We reserve a slot for each possible ProcNumber, plus one for each
  * possible auxiliary process type.  (This scheme assumes there is not
- * more than one of any auxiliary process type at a time.)
+ * more than one of any auxiliary process type at a time, except for
+ * IO workers.)
  */
 #define NumProcSignalSlots (MaxBackends + NUM_AUXILIARY_PROCS)
 
index 2da91738c3271e27d467e5fe5960b33606479222..c5748b690f4089e42a234e1977b78dacaf50596e 100644 (file)
@@ -198,7 +198,8 @@ typedef struct SISeg
 /*
  * We reserve a slot for each possible ProcNumber, plus one for each
  * possible auxiliary process type.  (This scheme assumes there is not
- * more than one of any auxiliary process type at a time.)
+ * more than one of any auxiliary process type at a time, except for
+ * IO workers.)
  */
 #define NumProcStateSlots  (MaxBackends + NUM_AUXILIARY_PROCS)
 
index 72f5655fb344d1a7063f82c4e039047811bfbe1d..629772b038102df9f593cb2ff13d7dd88c1eaee5 100644 (file)
@@ -353,7 +353,7 @@ typedef enum BackendType
     * Auxiliary processes. These have PGPROC entries, but they are not
     * attached to any particular database, and cannot run transactions or
     * even take heavyweight locks. There can be only one of each of these
-    * running at a time.
+    * running at a time, except for IO workers.
     *
     * If you modify these, make sure to update NUM_AUXILIARY_PROCS and the
     * glossary in the docs.