1/*-------------------------------------------------------------------------
4 * AIO - Functionality related to executing IO for different targets
6 * Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
7 * Portions Copyright (c) 1994, Regents of the University of California
10 * src/backend/storage/aio/aio_target.c
12 *-------------------------------------------------------------------------
23 * Registry for entities that can be the target of AIO.
34/* --------------------------------------------------------------------------------
35 * Public target related functions operating on IO Handles
36 * --------------------------------------------------------------------------------
46 * Return the name for the target associated with the IO. Mostly useful for
52 /* explicitly allow INVALID here, function used by debug messages */
59 * Assign a target to the IO.
61 * This has to be called exactly once before pgaio_io_start_*() is called.
79 * Return a stringified description of the IO's target.
81 * The string is localized and allocated in the current memory context.
86 /* disallow INVALID, there wouldn't be a description */
94/* --------------------------------------------------------------------------------
95 * Internal target related functions operating on IO Handles
96 * --------------------------------------------------------------------------------
100 * Internal: Check if pgaio_io_reopen() is available for the IO.
111 * Internal: Before executing an IO outside of the context of the process the
112 * IO has been staged in, the file descriptor has to be reopened - any FD
113 * referenced in the IO itself, won't be valid in the separate process.
PgAioTargetData * pgaio_io_get_target_data(PgAioHandle *ioh)
static const PgAioTargetInfo * pgaio_target_info[]
void pgaio_io_reopen(PgAioHandle *ioh)
bool pgaio_io_can_reopen(PgAioHandle *ioh)
bool pgaio_io_has_target(PgAioHandle *ioh)
const char * pgaio_io_get_target_name(PgAioHandle *ioh)
char * pgaio_io_get_target_description(PgAioHandle *ioh)
void pgaio_io_set_target(PgAioHandle *ioh, PgAioTargetID targetid)
struct PgAioTargetInfo PgAioTargetInfo
Assert(PointerIsAligned(start, uint64))
const PgAioTargetInfo aio_smgr_target_info
PgAioTargetData target_data
void(* reopen)(PgAioHandle *ioh)
char *(* describe_identity)(const PgAioTargetData *sd)