PostgreSQL Source Code git master
|
Go to the source code of this file.
Typedefs | |
typedef struct XLogPrefetcher | XLogPrefetcher |
Enumerations | |
enum | RecoveryPrefetchValue { RECOVERY_PREFETCH_OFF , RECOVERY_PREFETCH_ON , RECOVERY_PREFETCH_TRY } |
Functions | |
void | XLogPrefetchReconfigure (void) |
size_t | XLogPrefetchShmemSize (void) |
void | XLogPrefetchShmemInit (void) |
void | XLogPrefetchResetStats (void) |
XLogPrefetcher * | XLogPrefetcherAllocate (XLogReaderState *reader) |
void | XLogPrefetcherFree (XLogPrefetcher *prefetcher) |
XLogReaderState * | XLogPrefetcherGetReader (XLogPrefetcher *prefetcher) |
void | XLogPrefetcherBeginRead (XLogPrefetcher *prefetcher, XLogRecPtr recPtr) |
XLogRecord * | XLogPrefetcherReadRecord (XLogPrefetcher *prefetcher, char **errmsg) |
void | XLogPrefetcherComputeStats (XLogPrefetcher *prefetcher) |
Variables | |
PGDLLIMPORT int | recovery_prefetch |
typedef struct XLogPrefetcher XLogPrefetcher |
Definition at line 32 of file xlogprefetcher.h.
Enumerator | |
---|---|
RECOVERY_PREFETCH_OFF | |
RECOVERY_PREFETCH_ON | |
RECOVERY_PREFETCH_TRY |
Definition at line 24 of file xlogprefetcher.h.
XLogPrefetcher * XLogPrefetcherAllocate | ( | XLogReaderState * | reader | ) |
Definition at line 362 of file xlogprefetcher.c.
References XLogPrefetchStats::block_distance, ctl, dlist_init(), XLogPrefetcher::filter_queue, XLogPrefetcher::filter_table, HASH_BLOBS, hash_create(), HASH_ELEM, XLogPrefetchStats::io_depth, palloc0(), XLogPrefetcher::reader, XLogPrefetcher::reconfigure_count, SharedStats, XLogPrefetchStats::wal_distance, and XLogPrefetchReconfigureCount.
Referenced by InitWalRecovery().
void XLogPrefetcherBeginRead | ( | XLogPrefetcher * | prefetcher, |
XLogRecPtr | recPtr | ||
) |
Definition at line 962 of file xlogprefetcher.c.
References XLogPrefetcher::begin_ptr, XLogPrefetcher::no_readahead_until, XLogPrefetcher::reader, XLogPrefetcher::reconfigure_count, and XLogBeginRead().
Referenced by FinishWalRecovery(), InitWalRecovery(), PerformWalRecovery(), and ReadCheckpointRecord().
void XLogPrefetcherComputeStats | ( | XLogPrefetcher * | prefetcher | ) |
Definition at line 410 of file xlogprefetcher.c.
References XLogPrefetchStats::block_distance, XLogReaderState::decode_queue_head, XLogReaderState::decode_queue_tail, XLogPrefetchStats::io_depth, lrq_completed(), lrq_inflight(), DecodedXLogRecord::lsn, XLogPrefetcher::next_stats_shm_lsn, XLogPrefetcher::reader, XLogReaderState::ReadRecPtr, SharedStats, XLogPrefetcher::streaming_read, XLogPrefetchStats::wal_distance, and XLOGPREFETCHER_STATS_DISTANCE.
Referenced by ShutdownWalRecovery(), WaitForWALToBecomeAvailable(), and XLogPrefetcherReadRecord().
void XLogPrefetcherFree | ( | XLogPrefetcher * | prefetcher | ) |
Definition at line 390 of file xlogprefetcher.c.
References XLogPrefetcher::filter_table, hash_destroy(), lrq_free(), pfree(), and XLogPrefetcher::streaming_read.
Referenced by ShutdownWalRecovery().
XLogReaderState * XLogPrefetcherGetReader | ( | XLogPrefetcher * | prefetcher | ) |
Definition at line 401 of file xlogprefetcher.c.
References XLogPrefetcher::reader.
Referenced by ReadRecord().
XLogRecord * XLogPrefetcherReadRecord | ( | XLogPrefetcher * | prefetcher, |
char ** | errmsg | ||
) |
Definition at line 981 of file xlogprefetcher.c.
References Assert, errmsg(), DecodedXLogRecord::header, lrq_alloc(), lrq_complete_lsn(), lrq_completed(), lrq_free(), lrq_inflight(), lrq_prefetch(), DecodedXLogRecord::lsn, maintenance_io_concurrency, XLogPrefetcher::next_stats_shm_lsn, XLogPrefetcher::reader, XLogPrefetcher::reconfigure_count, XLogPrefetcher::record, XLogReaderState::record, RecoveryPrefetchEnabled, XLogPrefetcher::streaming_read, unlikely, XLogNextRecord(), XLOGPREFETCHER_DISTANCE_MULTIPLIER, XLogPrefetcherCompleteFilters(), XLogPrefetcherComputeStats(), XLogPrefetcherNextBlock(), XLogPrefetchReconfigureCount, XLogReaderHasQueuedRecordOrError(), and XLogReleasePreviousRecord().
Referenced by ReadRecord().
void XLogPrefetchReconfigure | ( | void | ) |
Definition at line 340 of file xlogprefetcher.c.
References XLogPrefetchReconfigureCount.
Referenced by ApplyWalRecord(), assign_maintenance_io_concurrency(), and assign_recovery_prefetch().
void XLogPrefetchResetStats | ( | void | ) |
Definition at line 303 of file xlogprefetcher.c.
References GetCurrentTimestamp(), XLogPrefetchStats::hit, pg_atomic_write_u64(), XLogPrefetchStats::prefetch, XLogPrefetchStats::reset_time, SharedStats, XLogPrefetchStats::skip_fpw, XLogPrefetchStats::skip_init, XLogPrefetchStats::skip_new, and XLogPrefetchStats::skip_rep.
Referenced by pg_stat_reset_shared().
void XLogPrefetchShmemInit | ( | void | ) |
Definition at line 315 of file xlogprefetcher.c.
References GetCurrentTimestamp(), XLogPrefetchStats::hit, pg_atomic_init_u64(), XLogPrefetchStats::prefetch, XLogPrefetchStats::reset_time, SharedStats, ShmemInitStruct(), XLogPrefetchStats::skip_fpw, XLogPrefetchStats::skip_init, XLogPrefetchStats::skip_new, and XLogPrefetchStats::skip_rep.
Referenced by CreateOrAttachShmemStructs().
size_t XLogPrefetchShmemSize | ( | void | ) |
Definition at line 294 of file xlogprefetcher.c.
Referenced by CalculateShmemSize().
|
extern |
Definition at line 68 of file xlogprefetcher.c.
Referenced by assign_recovery_prefetch().