|
PostgreSQL Source Code git master
|


Go to the source code of this file.
Data Structures | |
| union | PgAioOpData |
| struct | PgAioTargetInfo |
| struct | PgAioHandleCallbacks |
Enumerations | |
| enum | IoMethod { IOMETHOD_SYNC = 0 , IOMETHOD_WORKER } |
| enum | PgAioHandleFlags { PGAIO_HF_REFERENCES_LOCAL = 1 << 1 , PGAIO_HF_SYNCHRONOUS = 1 << 0 , PGAIO_HF_BUFFERED = 1 << 2 } |
| enum | PgAioOp { PGAIO_OP_INVALID = 0 , PGAIO_OP_READV , PGAIO_OP_WRITEV } |
| enum | PgAioTargetID { PGAIO_TID_INVALID = 0 , PGAIO_TID_SMGR } |
| enum | PgAioHandleCallbackID { PGAIO_HCB_INVALID = 0 , PGAIO_HCB_MD_READV , PGAIO_HCB_SHARED_BUFFER_READV , PGAIO_HCB_LOCAL_BUFFER_READV } |
Variables | |
| PGDLLIMPORT int | io_method |
| PGDLLIMPORT int | io_max_concurrency |
| #define DEFAULT_IO_METHOD IOMETHOD_WORKER |
| #define PGAIO_HCB_MAX PGAIO_HCB_LOCAL_BUFFER_READV |
| #define PGAIO_OP_COUNT (PGAIO_OP_WRITEV + 1) |
| #define PGAIO_TID_COUNT (PGAIO_TID_SMGR + 1) |
| typedef PgAioResult(* PgAioHandleCallbackComplete) (PgAioHandle *ioh, PgAioResult prior_result, uint8 cb_flags) |
| typedef void(* PgAioHandleCallbackReport) (PgAioResult result, const PgAioTargetData *target_data, int elevel) |
| Enumerator | |
|---|---|
| IOMETHOD_SYNC | |
| IOMETHOD_WORKER | |
Definition at line 32 of file aio.h.
| Enumerator | |
|---|---|
| PGAIO_HCB_INVALID | |
| PGAIO_HCB_MD_READV | |
| PGAIO_HCB_SHARED_BUFFER_READV | |
| PGAIO_HCB_LOCAL_BUFFER_READV | |
| Enumerator | |
|---|---|
| PGAIO_HF_REFERENCES_LOCAL | |
| PGAIO_HF_SYNCHRONOUS | |
| PGAIO_HF_BUFFERED | |
Definition at line 48 of file aio.h.
| Enumerator | |
|---|---|
| PGAIO_OP_INVALID | |
| PGAIO_OP_READV | |
| PGAIO_OP_WRITEV | |
Definition at line 87 of file aio.h.
| Enumerator | |
|---|---|
| PGAIO_TID_INVALID | |
| PGAIO_TID_SMGR | |
Definition at line 116 of file aio.h.
Definition at line 1220 of file aio.c.
References dlist_iter::cur, dclist_container, dclist_count(), dclist_foreach, dclist_is_empty(), DEBUG2, fb(), fd(), PgAioBackend::in_flight_ios, PgAioBackend::num_staged_ios, pgaio_debug, pgaio_debug_io, pgaio_io_uses_fd(), pgaio_io_wait(), pgaio_method_ops, pgaio_my_backend, pgaio_submit_staged(), and IoMethodOps::wait_on_fd_before_close.
Referenced by CloseTransientFile(), FileClose(), FreeDesc(), and LruDelete().
Definition at line 1081 of file aio.c.
References elog, ERROR, PgAioBackend::in_batchmode, and pgaio_my_backend.
Referenced by batch_start(), read_rel_block_ll(), and read_stream_look_ahead().
Definition at line 1092 of file aio.c.
References Assert, PgAioBackend::in_batchmode, pgaio_my_backend, and pgaio_submit_staged().
Referenced by batch_end(), read_rel_block_ll(), and read_stream_look_ahead().
Definition at line 1107 of file aio.c.
References Assert, PgAioBackend::in_batchmode, PgAioBackend::num_staged_ios, and pgaio_my_backend.
Referenced by ReadBuffersCanStartIO().
|
extern |
Definition at line 162 of file aio.c.
References fb(), pgaio_io_acquire_nb(), and pgaio_io_wait_for_free().
Referenced by AsyncReadBuffers(), handle_get(), handle_get_and_error(), handle_get_release(), handle_get_twice(), and read_rel_block_ll().
|
extern |
Definition at line 188 of file aio.c.
References Assert, dclist_container, dclist_is_empty(), dclist_pop_head_node(), elog, ERROR, fb(), PgAioBackend::handed_out_io, HOLD_INTERRUPTS, PgAioBackend::idle_ios, MyProcNumber, PgAioBackend::num_staged_ios, PGAIO_HS_HANDED_OUT, PGAIO_HS_IDLE, pgaio_io_resowner_register(), pgaio_io_update_state(), pgaio_my_backend, PGAIO_RS_UNKNOWN, PGAIO_SUBMIT_BATCH_SIZE, pgaio_submit_staged(), PgAioReturn::result, RESUME_INTERRUPTS, and PgAioResult::status.
Referenced by AsyncReadBuffers(), and pgaio_io_acquire().
|
extern |
Definition at line 156 of file aio_callback.c.
References Assert, fb(), PgAioCtl::handle_data, len, and pgaio_ctl.
Referenced by buffer_readv_complete(), and buffer_stage_common().
|
extern |
Definition at line 342 of file aio.c.
References Assert, fb(), PgAioCtl::io_handle_count, PgAioCtl::io_handles, and pgaio_ctl.
Referenced by pg_get_aios(), pgaio_io_wait(), pgaio_io_wait_for_free(), and pgaio_worker_submission_queue_insert().
|
extern |
Definition at line 42 of file aio_io.c.
References Assert, fb(), PgAioCtl::iovecs, PG_IOV_MAX, pgaio_ctl, and PGAIO_HS_HANDED_OUT.
Referenced by mdstartreadv().
|
extern |
|
extern |
|
extern |
Definition at line 355 of file aio.c.
References fb(), and PgAioHandle::owner_procno.
Referenced by buffer_readv_complete(), and smgr_aio_reopen().
|
extern |
Definition at line 73 of file aio_target.c.
References fb().
Referenced by buffer_readv_complete(), md_readv_complete(), pgaio_io_set_target_smgr(), shared_buffer_readv_complete_local(), and smgr_aio_reopen().
|
extern |
Definition at line 84 of file aio_target.c.
References Assert, PgAioTargetInfo::describe_identity, fb(), pgaio_target_info, PGAIO_TID_COUNT, and PGAIO_TID_INVALID.
Referenced by pg_get_aios().
|
extern |
Definition at line 366 of file aio.c.
References Assert, fb(), PgAioHandle::generation, PgAioCtl::io_handles, pgaio_ctl, PGAIO_HS_DEFINED, PGAIO_HS_HANDED_OUT, and PGAIO_HS_STAGED.
Referenced by AsyncReadBuffers(), buffer_stage_common(), and read_rel_block_ll().
|
extern |
Definition at line 40 of file aio_target.c.
References fb(), and PGAIO_TID_INVALID.
Referenced by pgaio_io_before_start(), and pgaio_io_stage().
|
extern |
Definition at line 86 of file aio_callback.c.
References aio_handle_cbs, Assert, PgAioHandleCallbacksEntry::cb, PgAioHandleCallbacks::complete_local, DEBUG3, elog, ERROR, fb(), lengthof, PANIC, pgaio_debug_io, PGAIO_HANDLE_MAX_CALLBACKS, and PGAIO_HCB_MAX.
Referenced by AsyncReadBuffers(), mdstartreadv(), and read_rel_block_ll().
|
extern |
Definition at line 240 of file aio.c.
References Assert, elog, ERROR, fb(), PgAioBackend::handed_out_io, PGAIO_HS_HANDED_OUT, pgaio_io_reclaim(), and pgaio_my_backend.
Referenced by AsyncReadBuffers(), handle_get_release(), and handle_release_last().
|
extern |
Definition at line 266 of file aio.c.
References Assert, dlist_container, elog, ERROR, fb(), PgAioBackend::handed_out_io, HOLD_INTERRUPTS, PGAIO_HS_COMPLETED_IO, PGAIO_HS_COMPLETED_LOCAL, PGAIO_HS_COMPLETED_SHARED, PGAIO_HS_DEFINED, PGAIO_HS_HANDED_OUT, PGAIO_HS_IDLE, PGAIO_HS_STAGED, PGAIO_HS_SUBMITTED, pgaio_io_reclaim(), pgaio_my_backend, pgaio_submit_staged(), ResourceOwnerForgetAioHandle(), RESUME_INTERRUPTS, and WARNING.
Referenced by ResourceOwnerReleaseInternal().
|
extern |
Definition at line 330 of file aio.c.
References Assert, fb(), flag(), and PGAIO_HS_HANDED_OUT.
Referenced by AsyncReadBuffers(), mdstartreadv(), and read_rel_block_ll().
|
extern |
Definition at line 140 of file aio_callback.c.
References Assert, data, fb(), PgAioCtl::handle_data, i, io_max_combine_limit, len, PG_IOV_MAX, pgaio_ctl, and PGAIO_HS_HANDED_OUT.
Referenced by AsyncReadBuffers(), and read_rel_block_ll().
|
extern |
Definition at line 122 of file aio_callback.c.
References Assert, data, fb(), PgAioCtl::handle_data, i, io_max_combine_limit, len, PG_IOV_MAX, pgaio_ctl, and PGAIO_HS_HANDED_OUT.
|
extern |
Definition at line 64 of file aio_target.c.
References Assert, fb(), PGAIO_HS_HANDED_OUT, and PGAIO_TID_INVALID.
Referenced by pgaio_io_set_target_smgr().
|
extern |
Definition at line 78 of file aio_io.c.
References fb(), fd(), pgaio_io_before_start(), pgaio_io_stage(), and PGAIO_OP_READV.
Referenced by FileStartReadV().
|
extern |
Definition at line 91 of file aio_io.c.
References fb(), fd(), pgaio_io_before_start(), pgaio_io_stage(), and PGAIO_OP_WRITEV.
|
extern |
Definition at line 173 of file aio_callback.c.
References aio_handle_cbs, Assert, elog, ERROR, fb(), PgAioResult::id, PGAIO_RS_OK, PGAIO_RS_UNKNOWN, and PgAioResult::status.
Referenced by buffer_readv_complete(), buffer_readv_complete_one(), md_readv_complete(), ProcessReadBuffersResult(), and read_rel_block_ll().
Definition at line 1123 of file aio.c.
References Assert, DEBUG4, END_CRIT_SECTION, fb(), PgAioBackend::num_staged_ios, pgaio_debug, pgaio_method_ops, pgaio_my_backend, PgAioBackend::staged_ios, START_CRIT_SECTION, and IoMethodOps::submit.
Referenced by AsyncReadBuffers(), pgaio_closing_fd(), pgaio_error_cleanup(), pgaio_exit_batchmode(), pgaio_io_acquire_nb(), pgaio_io_release_resowner(), pgaio_io_stage(), pgaio_io_wait_for_free(), and ReadBuffersCanStartIO().
|
extern |
Definition at line 1005 of file aio.c.
References fb(), MyProcNumber, PGAIO_HS_COMPLETED_LOCAL, PGAIO_HS_COMPLETED_SHARED, PGAIO_HS_IDLE, pgaio_io_from_wref(), pgaio_io_reclaim(), and pgaio_io_was_recycled().
Referenced by WaitReadBuffers().
|
extern |
Definition at line 964 of file aio.c.
References fb(), and PG_UINT32_MAX.
Referenced by AsyncReadBuffers(), BufferManagerShmemInit(), InitLocalBuffers(), StartReadBuffersImpl(), TerminateBufferIO(), and TerminateLocalBufferIO().
|
extern |
|
extern |
Definition at line 971 of file aio.c.
References fb(), and PG_UINT32_MAX.
Referenced by InvalidateLocalBuffer(), pgaio_wref_get_id(), ProcessReadBuffersResult(), StartLocalBufferIO(), WaitIO(), and WaitReadBuffers().
|
extern |
Definition at line 991 of file aio.c.
References fb(), pgaio_io_from_wref(), and pgaio_io_wait().
Referenced by InvalidateLocalBuffer(), read_rel_block_ll(), StartLocalBufferIO(), WaitIO(), and WaitReadBuffers().
| StaticAssertDecl | ( | ) |
|
extern |
Definition at line 75 of file aio.c.
Referenced by AioHandleDataShmemSize(), AioHandleIOVShmemSize(), AioHandleShmemSize(), AioShmemInit(), AioShmemSize(), and pgaio_io_wait_for_free().
|
extern |
Definition at line 74 of file aio.c.
Referenced by pgaio_workers_enabled(), read_stream_begin_impl(), StartReadBuffersImpl(), and WaitReadBuffers().