↑↓ select↵ open⌫ change scopeOpen full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Wiki / System Catalogs

pg_aios

The pg_aios view lists all Asynchronous I/O handles that are currently in-use. An I/O handle is used to reference an I/O operation that is being prepared, executed or is in the process of completing. pg_aios contains one row for each I/O handle. This view is mainly useful for developers of PostgreSQL, but may also be useful when tuning PostgreSQL.

English manual coverage begins with PostgreSQL 7.4. Source history and runtime observations have their own recorded version boundaries.

Reading PG 18·Select a recorded version

kind
view
lang
en
measured attributes
true
metadata release
18.6
runtime columns
pid, io_id, io_generation, state, operation, off, length, target, handle_data_len, raw_result, result, target_desc, f_sync, f_localmem, f_buffered
runtime verified
false
source
english-manual

Definition PG 18

The pg_aios view lists all Asynchronous I/O handles that are currently in-use. An I/O handle is used to reference an I/O operation that is being prepared, executed or is in the process of completing. pg_aios contains one row for each I/O handle. This view is mainly useful for developers of PostgreSQL, but may also be useful when tuning PostgreSQL.

Catalog columns

ColumnTypeNullabilityDescription
pidint4NullableProcess ID of the server process that is issuing this I/O.
io_idint4NullableIdentifier of the I/O handle. Handles are reused once the I/O completed (or if the handle is released before I/O is started). On reuse pg_aios.io_generation is incremented.
io_generationint8NullableGeneration of the I/O handle.
statetextNullableState of the I/O handle: HANDED_OUT, referenced by code but not yet used DEFINED, information necessary for execution is known STAGED, ready for execution SUBMITTED, submitted for execution COMPLETED_IO, finished, but result has not yet been processed COMPLETED_SHARED, shared completion processing completed COMPLETED_LOCAL, backend local completion processing completed
operationtextNullableOperation performed using the I/O handle: invalid, not yet known readv, a vectored read writev, a vectored write
offint8NullableOffset of the I/O operation.
lengthint8NullableLength of the I/O operation.
targettextNullableWhat kind of object is the I/O targeting: smgr, I/O on relations
handle_data_lenint2NullableLength of the data associated with the I/O operation. For I/O to/from shared_buffers and temp_buffers, this indicates the number of buffers the I/O is operating on.
raw_resultint4NullableLow-level result of the I/O operation, or NULL if the operation has not yet completed.
resulttextNullableHigh-level result of the I/O operation: UNKNOWN means that the result of the operation is not yet known. OK means the I/O completed successfully. PARTIAL means that the I/O completed without error, but did not process all data. Commonly callers will need to retry and perform the remainder of the work in a separate I/O. WARNING means that the I/O completed without error, but that execution of the IO triggered a warning. E.g. when encountering a corrupted buffer with zero_damaged_pages enabled. ERROR means the I/O failed with an error.
target_desctextNullableDescription of what the I/O operation is targeting.
f_syncboolNullableFlag indicating whether the I/O is executed synchronously.
f_localmemboolNullableFlag indicating whether the I/O references process local memory.
f_bufferedboolNullableFlag indicating whether the I/O is buffered I/O.

Compare versions

Source references

Full definition and evidence JSON

Definition sources

center · PostgreSQL 18 · catalog-bilingual-repair:6fbfac51d8d415eca4b4e18f218c6f5cdea3b9b018504444803c44e6a4aab166

Text language: en · catalog-bilingual-repair:6fbfac51d8d415eca4b4e18f218c6f5cdea3b9b018504444803c44e6a4aab166