From 02844012b304ba80d1c48d51f6fe10bb622490cc Mon Sep 17 00:00:00 2001 From: Andres Freund Date: Mon, 17 Mar 2025 18:51:33 -0400 Subject: aio: Basic subsystem initialization This commit just does the minimal wiring up of the AIO subsystem, added in the next commit, to the rest of the system. The next commit contains more details about motivation and architecture. This commit is kept separate to make it easier to review, separating the changes across the tree, from the implementation of the new subsystem. We discussed squashing this commit with the main commit before merging AIO, but there has been a mild preference for keeping it separate. Reviewed-by: Heikki Linnakangas Reviewed-by: Noah Misch Discussion: https://postgr.es/m/uvrtrknj4kdytuboidbhwclo4gxhswwcpgadptsjvjqcluzmah%40brqs62irg4dt --- src/backend/utils/misc/guc_tables.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'src/backend/utils/misc/guc_tables.c') diff --git a/src/backend/utils/misc/guc_tables.c b/src/backend/utils/misc/guc_tables.c index 9c0b10ad4dc..0d3ebf06a95 100644 --- a/src/backend/utils/misc/guc_tables.c +++ b/src/backend/utils/misc/guc_tables.c @@ -72,6 +72,7 @@ #include "replication/slot.h" #include "replication/slotsync.h" #include "replication/syncrep.h" +#include "storage/aio.h" #include "storage/bufmgr.h" #include "storage/bufpage.h" #include "storage/large_object.h" @@ -3254,6 +3255,18 @@ struct config_int ConfigureNamesInt[] = NULL, NULL, NULL }, + { + {"io_max_concurrency", + PGC_POSTMASTER, + RESOURCES_IO, + gettext_noop("Max number of IOs that one process can execute simultaneously."), + NULL, + }, + &io_max_concurrency, + -1, -1, 1024, + check_io_max_concurrency, NULL, NULL + }, + { {"backend_flush_after", PGC_USERSET, RESOURCES_IO, gettext_noop("Number of pages after which previously performed writes are flushed to disk."), @@ -5311,6 +5324,16 @@ struct config_enum ConfigureNamesEnum[] = NULL, NULL, NULL }, + { + {"io_method", PGC_POSTMASTER, RESOURCES_IO, + gettext_noop("Selects the method for executing asynchronous I/O."), + NULL + }, + &io_method, + DEFAULT_IO_METHOD, io_method_options, + NULL, assign_io_method, NULL + }, + /* End-of-list marker */ { {NULL, 0, 0, NULL, NULL}, NULL, 0, NULL, NULL, NULL, NULL -- cgit v1.2.3