PostgreSQL Source Code
git master
|
Go to the source code of this file.
Data Structures | |
struct | BlockRangeReadStreamPrivate |
Macros | |
#define | READ_STREAM_DEFAULT 0x00 |
#define | READ_STREAM_MAINTENANCE 0x01 |
#define | READ_STREAM_SEQUENTIAL 0x02 |
#define | READ_STREAM_FULL 0x04 |
Typedefs | |
typedef struct ReadStream | ReadStream |
typedef struct BlockRangeReadStreamPrivate | BlockRangeReadStreamPrivate |
typedef BlockNumber(* | ReadStreamBlockNumberCB) (ReadStream *stream, void *callback_private_data, void *per_buffer_data) |
Functions | |
BlockNumber | block_range_read_stream_cb (ReadStream *stream, void *callback_private_data, void *per_buffer_data) |
ReadStream * | read_stream_begin_relation (int flags, BufferAccessStrategy strategy, Relation rel, ForkNumber forknum, ReadStreamBlockNumberCB callback, void *callback_private_data, size_t per_buffer_data_size) |
Buffer | read_stream_next_buffer (ReadStream *stream, void **per_buffer_data) |
BlockNumber | read_stream_next_block (ReadStream *stream, BufferAccessStrategy *strategy) |
ReadStream * | read_stream_begin_smgr_relation (int flags, BufferAccessStrategy strategy, SMgrRelation smgr, char smgr_persistence, ForkNumber forknum, ReadStreamBlockNumberCB callback, void *callback_private_data, size_t per_buffer_data_size) |
void | read_stream_reset (ReadStream *stream) |
void | read_stream_end (ReadStream *stream) |
#define READ_STREAM_DEFAULT 0x00 |
Definition at line 21 of file read_stream.h.
#define READ_STREAM_FULL 0x04 |
Definition at line 43 of file read_stream.h.
#define READ_STREAM_MAINTENANCE 0x01 |
Definition at line 28 of file read_stream.h.
#define READ_STREAM_SEQUENTIAL 0x02 |
Definition at line 36 of file read_stream.h.
typedef struct BlockRangeReadStreamPrivate BlockRangeReadStreamPrivate |
typedef struct ReadStream ReadStream |
Definition at line 1 of file read_stream.h.
typedef BlockNumber(* ReadStreamBlockNumberCB) (ReadStream *stream, void *callback_private_data, void *per_buffer_data) |
Definition at line 56 of file read_stream.h.
BlockNumber block_range_read_stream_cb | ( | ReadStream * | stream, |
void * | callback_private_data, | ||
void * | per_buffer_data | ||
) |
Definition at line 171 of file read_stream.c.
References BlockRangeReadStreamPrivate::current_blocknum, InvalidBlockNumber, and BlockRangeReadStreamPrivate::last_exclusive.
Referenced by collect_visibility_data(), pg_prewarm(), and RelationCopyStorageUsingBuffer().
ReadStream* read_stream_begin_relation | ( | int | flags, |
BufferAccessStrategy | strategy, | ||
Relation | rel, | ||
ForkNumber | forknum, | ||
ReadStreamBlockNumberCB | callback, | ||
void * | callback_private_data, | ||
size_t | per_buffer_data_size | ||
) |
Definition at line 551 of file read_stream.c.
References callback(), RelationData::rd_rel, read_stream_begin_impl(), and RelationGetSmgr().
Referenced by acquire_sample_rows(), collect_corrupt_items(), collect_visibility_data(), heap_beginscan(), and pg_prewarm().
ReadStream* read_stream_begin_smgr_relation | ( | int | flags, |
BufferAccessStrategy | strategy, | ||
SMgrRelation | smgr, | ||
char | smgr_persistence, | ||
ForkNumber | forknum, | ||
ReadStreamBlockNumberCB | callback, | ||
void * | callback_private_data, | ||
size_t | per_buffer_data_size | ||
) |
Definition at line 575 of file read_stream.c.
References callback(), and read_stream_begin_impl().
Referenced by RelationCopyStorageUsingBuffer().
void read_stream_end | ( | ReadStream * | stream | ) |
Definition at line 846 of file read_stream.c.
References pfree(), and read_stream_reset().
Referenced by acquire_sample_rows(), collect_corrupt_items(), collect_visibility_data(), heap_endscan(), pg_prewarm(), and RelationCopyStorageUsingBuffer().
BlockNumber read_stream_next_block | ( | ReadStream * | stream, |
BufferAccessStrategy * | strategy | ||
) |
Definition at line 807 of file read_stream.c.
References ReadStream::ios, InProgressIO::op, read_stream_get_block(), and ReadBuffersOperation::strategy.
Buffer read_stream_next_buffer | ( | ReadStream * | stream, |
void ** | per_buffer_data | ||
) |
Definition at line 605 of file read_stream.c.
References ReadStream::advice_enabled, Assert, InProgressIO::buffer_index, BufferIsValid(), ReadStream::buffers, ReadBuffersOperation::buffers, ReadStream::distance, ReadStream::fast_path, ReadBuffersOperation::flags, get_per_buffer_data(), InvalidBlockNumber, InvalidBuffer, io_combine_limit, ReadStream::ios, ReadStream::ios_in_progress, likely, ReadStream::max_ios, ReadStream::max_pinned_buffers, Min, ReadStream::next_buffer_index, ReadStream::next_io_index, ReadStream::oldest_buffer_index, ReadStream::oldest_io_index, InProgressIO::op, ReadStream::pending_read_nblocks, ReadStream::per_buffer_data, ReadStream::per_buffer_data_size, ReadStream::pinned_buffers, ReadStream::queue_size, READ_BUFFERS_ISSUE_ADVICE, read_stream_get_block(), read_stream_look_ahead(), ReadStream::seq_blocknum, StartReadBuffer(), unlikely, and WaitReadBuffers().
Referenced by collect_corrupt_items(), collect_visibility_data(), heap_fetch_next_buffer(), heapam_scan_analyze_next_block(), pg_prewarm(), read_stream_reset(), and RelationCopyStorageUsingBuffer().
void read_stream_reset | ( | ReadStream * | stream | ) |
Definition at line 820 of file read_stream.c.
References Assert, ReadStream::buffered_blocknum, ReadStream::distance, ReadStream::fast_path, InvalidBlockNumber, InvalidBuffer, ReadStream::ios_in_progress, ReadStream::pinned_buffers, read_stream_next_buffer(), and ReleaseBuffer().
Referenced by heap_fetch_next_buffer(), heap_rescan(), and read_stream_end().