minor fix related to Auxiliary processes and IO workers
Hello Andres,
I noticed a comment in "include/miscadmin.h" which might be need a fix:
it states that there is a single auxiliary process of each kind running
at once.
However, with IO workers it's not true anymore I believe.
See minor patch attached.
---
Cédric Villemain +33 6 20 30 22 52
https://www.Data-Bene.io
PostgreSQL Support, Expertise, Training, R&D
Attachments:
0001-Fix-comment-on-auxiliary-processes-for-IO-workers.patchtext/x-patch; charset=UTF-8; name=0001-Fix-comment-on-auxiliary-processes-for-IO-workers.patchDownload
From 1e1c4df44ee0fbaaed0fee2a0e812928bb339dd5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=A9dric=20Villemain?= <Cedric.Villemain@Data-Bene.io>
Date: Tue, 6 May 2025 18:16:28 +0200
Subject: [PATCH] Fix comment on auxiliary processes for IO workers
The comment states that there can be only 1 process of each at a time
but several IO workers can be started.
---
src/include/miscadmin.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/include/miscadmin.h b/src/include/miscadmin.h
index 72f5655fb34..0a0abb13c8b 100644
--- a/src/include/miscadmin.h
+++ b/src/include/miscadmin.h
@@ -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 worker.
*
* If you modify these, make sure to update NUM_AUXILIARY_PROCS and the
* glossary in the docs.
--
2.47.2
On Tue, May 06, 2025 at 06:25:24PM +0200, Cédric Villemain wrote:
@@ -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 worker.
Right. Perhaps this should say "IO workers", no?
--
Michael
On 07/05/2025 01:52, Michael Paquier wrote:
On Tue, May 06, 2025 at 06:25:24PM +0200, Cédric Villemain wrote:
@@ -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 worker.Right. Perhaps this should say "IO workers", no?
Sure, modified this way.
---
Cédric Villemain +33 6 20 30 22 52
https://www.Data-Bene.io
PostgreSQL Support, Expertise, Training, R&D
Attachments:
0001-Fix-comment-on-auxiliary-processes-for-IO-workers.patchtext/x-patch; charset=UTF-8; name=0001-Fix-comment-on-auxiliary-processes-for-IO-workers.patchDownload
From b2c039e0488c4d3344f45130bec63873965e6896 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=A9dric=20Villemain?= <Cedric.Villemain@Data-Bene.io>
Date: Tue, 6 May 2025 18:16:28 +0200
Subject: [PATCH] Fix comment on auxiliary processes for IO workers
The comment states that there can be only 1 process of each at a time
but several IO workers can be started.
---
src/include/miscadmin.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/include/miscadmin.h b/src/include/miscadmin.h
index 72f5655fb34..629772b0381 100644
--- a/src/include/miscadmin.h
+++ b/src/include/miscadmin.h
@@ -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.
--
2.47.2
On Wed, May 07, 2025 at 03:25:07AM +0200, Cédric Villemain wrote:
Sure, modified this way.
I have detected two more of these under NumProcSignalSlots and
NumProcStateSlots. NUM_AUXILIARY_PROCS is adjusted in both cases with
MAX_IO_WORKERS, which is OK, but their comments were incorrect.
Adjusted these two as well, applied the result.
--
Michael
On 07/05/2025 07:56, Michael Paquier wrote:
On Wed, May 07, 2025 at 03:25:07AM +0200, Cédric Villemain wrote:
Sure, modified this way.
I have detected two more of these under NumProcSignalSlots and
NumProcStateSlots. NUM_AUXILIARY_PROCS is adjusted in both cases with
MAX_IO_WORKERS, which is OK, but their comments were incorrect.Adjusted these two as well, applied the result.
Thank you for the other edits.
---
Cédric Villemain +33 6 20 30 22 52
https://www.Data-Bene.io
PostgreSQL Support, Expertise, Training, R&D