diff options
Diffstat (limited to 'src/include/storage')
-rw-r--r-- | src/include/storage/aio_subsys.h | 4 | ||||
-rw-r--r-- | src/include/storage/io_worker.h | 22 | ||||
-rw-r--r-- | src/include/storage/proc.h | 4 |
3 files changed, 29 insertions, 1 deletions
diff --git a/src/include/storage/aio_subsys.h b/src/include/storage/aio_subsys.h index 2a6ca1c27a9..8a8ce87f62a 100644 --- a/src/include/storage/aio_subsys.h +++ b/src/include/storage/aio_subsys.h @@ -30,4 +30,8 @@ extern void pgaio_init_backend(void); extern void pgaio_error_cleanup(void); extern void AtEOXact_Aio(bool is_commit); + +/* aio_worker.c */ +extern bool pgaio_workers_enabled(void); + #endif /* AIO_SUBSYS_H */ diff --git a/src/include/storage/io_worker.h b/src/include/storage/io_worker.h new file mode 100644 index 00000000000..7bde7e89c8a --- /dev/null +++ b/src/include/storage/io_worker.h @@ -0,0 +1,22 @@ +/*------------------------------------------------------------------------- + * + * io_worker.h + * IO worker for implementing AIO "ourselves" + * + * + * Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group + * Portions Copyright (c) 1994, Regents of the University of California + * + * src/include/storage/io.h + * + *------------------------------------------------------------------------- + */ +#ifndef IO_WORKER_H +#define IO_WORKER_H + + +pg_noreturn extern void IoWorkerMain(const void *startup_data, size_t startup_data_len); + +extern PGDLLIMPORT int io_workers; + +#endif /* IO_WORKER_H */ diff --git a/src/include/storage/proc.h b/src/include/storage/proc.h index 0750ec3c474..f51b03d3822 100644 --- a/src/include/storage/proc.h +++ b/src/include/storage/proc.h @@ -449,7 +449,9 @@ extern PGDLLIMPORT PGPROC *PreparedXactProcs; * 2 slots, but WAL writer is launched only after startup has exited, so we * only need 6 slots. */ -#define NUM_AUXILIARY_PROCS 6 +#define MAX_IO_WORKERS 32 +#define NUM_AUXILIARY_PROCS (6 + MAX_IO_WORKERS) + /* configurable options */ extern PGDLLIMPORT int DeadlockTimeout; |