SYSTEM CATALOGS / STATISTICS VIEWS
pg_stat_io
Read PG 18 manual ↗The pg_stat_io view will contain one row for each combination of backend type, target I/O object, and I/O context, showing cluster-wide I/O statistics.
- Kind
- Statistics views
- Columns in this snapshot
- 20
- Definition source
- English manual
Columns 20
| Column | Type | Description / reference |
|---|---|---|
backend_type | text | Type of backend (e.g. background worker, autovacuum worker). See pg_stat_activity for more information on backend_types. Some backend_types do not accumulate I/O operation statistics and will not be included in the view. |
object | text | Target object of an I/O operation. Possible values are: |
context | text | The context of an I/O operation. Possible values are: |
reads | bigint | Number of read operations. |
read_bytes | numeric | The total size of read operations in bytes. |
read_time | double precision | Time spent waiting for read operations in milliseconds (if track_io_timing is enabled and object is not wal, or if track_wal_io_timing is enabled and object is wal, otherwise zero) |
writes | bigint | Number of write operations. |
write_bytes | numeric | The total size of write operations in bytes. |
write_time | double precision | Time spent waiting for write operations in milliseconds (if track_io_timing is enabled and object is not wal, or if track_wal_io_timing is enabled and object is wal, otherwise zero) |
writebacks | bigint | Number of units of size BLCKSZ (typically 8kB) which the process requested the kernel write out to permanent storage. |
writeback_time | double precision | Time spent waiting for writeback operations in milliseconds (if track_io_timing is enabled, otherwise zero). This includes the time spent queueing write-out requests and, potentially, the time spent to write out the dirty data. |
extends | bigint | Number of relation extend operations. |
extend_bytes | numeric | The total size of relation extend operations in bytes. |
extend_time | double precision | Time spent waiting for extend operations in milliseconds. (if track_io_timing is enabled and object is not wal, or if track_wal_io_timing is enabled and object is wal, otherwise zero) |
hits | bigint | The number of times a desired block was found in a shared buffer. |
evictions | bigint | Number of times a block has been written out from a shared or local buffer in order to make it available for another use. In context normal, this counts the number of times a block was evicted from a buffer and replaced with another block. In contexts bulkwrite, bulkread, and vacuum, this counts the number of times a block was evicted from shared buffers in order to add the shared buffer to a separate, size-limited ring buffer for use in a bulk I/O operation. |
reuses | bigint | The number of times an existing buffer in a size-limited ring buffer outside of shared buffers was reused as part of an I/O operation in the bulkread, bulkwrite, or vacuum contexts. |
fsyncs | bigint | Number of fsync calls. These are only tracked in context normal. |
fsync_time | double precision | Time spent waiting for fsync operations in milliseconds (if track_io_timing is enabled and object is not wal, or if track_wal_io_timing is enabled and object is wal, otherwise zero) |
stats_reset | timestamp with time zone | Time at which these statistics were last reset. |
Column history across versions
| Column | 9.0 | 9.1 | 9.2 | 9.3 | 9.4 | 9.5 | 9.6 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
backend_type | · | · | · | · | · | · | · | · | · | · | · | · | · | ● | ● | ● | ● | ● |
object | · | · | · | · | · | · | · | · | · | · | · | · | · | ● | ● | ● | ● | ● |
context | · | · | · | · | · | · | · | · | · | · | · | · | · | ● | ● | ● | ● | ● |
reads | · | · | · | · | · | · | · | · | · | · | · | · | · | ● | ● | ● | ● | ● |
read_time | · | · | · | · | · | · | · | · | · | · | · | · | · | ● | ● | ● | ● | ● |
writes | · | · | · | · | · | · | · | · | · | · | · | · | · | ● | ● | ● | ● | ● |
write_time | · | · | · | · | · | · | · | · | · | · | · | · | · | ● | ● | ● | ● | ● |
writebacks | · | · | · | · | · | · | · | · | · | · | · | · | · | ● | ● | ● | ● | ● |
writeback_time | · | · | · | · | · | · | · | · | · | · | · | · | · | ● | ● | ● | ● | ● |
extends | · | · | · | · | · | · | · | · | · | · | · | · | · | ● | ● | ● | ● | ● |
extend_time | · | · | · | · | · | · | · | · | · | · | · | · | · | ● | ● | ● | ● | ● |
op_bytes | · | · | · | · | · | · | · | · | · | · | · | · | · | ● | ● | · | · | · |
hits | · | · | · | · | · | · | · | · | · | · | · | · | · | ● | ● | ● | ● | ● |
evictions | · | · | · | · | · | · | · | · | · | · | · | · | · | ● | ● | ● | ● | ● |
reuses | · | · | · | · | · | · | · | · | · | · | · | · | · | ● | ● | ● | ● | ● |
fsyncs | · | · | · | · | · | · | · | · | · | · | · | · | · | ● | ● | ● | ● | ● |
fsync_time | · | · | · | · | · | · | · | · | · | · | · | · | · | ● | ● | ● | ● | ● |
stats_reset | · | · | · | · | · | · | · | · | · | · | · | · | · | ● | ● | ● | ● | ● |
read_bytes | · | · | · | · | · | · | · | · | · | · | · | · | · | · | · | ● | ● | ● |
write_bytes | · | · | · | · | · | · | · | · | · | · | · | · | · | · | · | ● | ● | ● |
extend_bytes | · | · | · | · | · | · | · | · | · | · | · | · | · | · | · | ● | ● | ● |
Version history 3
- PG 18 → 19changed
- PG 17 → 18changed
- PG 15 → 16added
Definition snapshot: english-manuals:84439b7d241cb340f7fb224624c… · English manual source