pg_stat_recovery_prefetch
The pg_stat_recovery_prefetch view will contain only one row. The columns wal_distance, block_distance and io_depth show current values, and the other columns show cumulative counters that can be reset with the pg_stat_reset_shared function.
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
- statistics
- lang
- en
- measured attributes
- true
- metadata release
- 18.6
- runtime columns
- stats_reset, prefetch, hit, skip_init, skip_new, skip_fpw, skip_rep, wal_distance, block_distance, io_depth
- runtime verified
- false
- source
- english-manual
Definition PG 18
The pg_stat_recovery_prefetch view will contain only one row. The columns wal_distance, block_distance and io_depth show current values, and the other columns show cumulative counters that can be reset with the pg_stat_reset_shared function.
Catalog columns
| Column | Type | Nullability | Description |
|---|---|---|---|
| stats_reset | timestamp with time zone | Nullable | Time at which these statistics were last reset |
| prefetch | bigint | Nullable | Number of blocks prefetched because they were not in the buffer pool |
| hit | bigint | Nullable | Number of blocks not prefetched because they were already in the buffer pool |
| skip_init | bigint | Nullable | Number of blocks not prefetched because they would be zero-initialized |
| skip_new | bigint | Nullable | Number of blocks not prefetched because they didn't exist yet |
| skip_fpw | bigint | Nullable | Number of blocks not prefetched because a full page image was included in the WAL |
| skip_rep | bigint | Nullable | Number of blocks not prefetched because they were already recently prefetched |
| wal_distance | int | Nullable | How many bytes ahead the prefetcher is looking |
| block_distance | int | Nullable | How many blocks ahead the prefetcher is looking |
| io_depth | int | Nullable | How many prefetches have been initiated but are not yet known to have completed |
Compare versions
Complete source facts
documentation revision
{"inputs":[{"file":"monitoring-stats.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"a97e4aa05484b41cec1f4c9b0b9c5a083596a056982e5d5ba0db1dd8d49961fb","version":"18.7"},{"file":"monitoring-stats.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"1ddb6576fe569e029a1c776c82e7add6be8e4f41705bcd8f66f4347fe23372b6","version":"18.7"}],"release":"18.7","runtime_remeasured":false,"source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552"}Source references
Full definition and evidence JSON
Definition sources
center · PostgreSQL 18 · catalog-bilingual-repair:ef4e07cbbdc9a0b311100615df88af0d888469047cf1093ed40f01f17d9aabad
Text language: en · catalog-bilingual-repair:ef4e07cbbdc9a0b311100615df88af0d888469047cf1093ed40f01f17d9aabad