pg_stat_io

显示 I/O 信息的统计视图

pg_stat_io 是一个显示集群范围 I/O 统计信息的统计视图

pg_stat_ioPostgreSQL 16 中添加。

按 PostgreSQL 版本定义

pg_stat_io (PostgreSQL 17)

                        View "pg_catalog.pg_stat_io"
     Column     |           Type           | Collation | Nullable | Default 
----------------+--------------------------+-----------+----------+---------
 backend_type   | text                     |           |          | 
 object         | text                     |           |          | 
 context        | text                     |           |          | 
 reads          | bigint                   |           |          | 
 read_time      | double precision         |           |          | 
 writes         | bigint                   |           |          | 
 write_time     | double precision         |           |          | 
 writebacks     | bigint                   |           |          | 
 writeback_time | double precision         |           |          | 
 extends        | bigint                   |           |          | 
 extend_time    | double precision         |           |          | 
 op_bytes       | bigint                   |           |          | 
 hits           | bigint                   |           |          | 
 evictions      | bigint                   |           |          | 
 reuses         | bigint                   |           |          | 
 fsyncs         | bigint                   |           |          | 
 fsync_time     | double precision         |           |          | 
 stats_reset    | timestamp with time zone |           |          |
    

文档: pg_stat_io

pg_stat_io (PostgreSQL 16)

                        View "pg_catalog.pg_stat_io"
     Column     |           Type           | Collation | Nullable | Default 
----------------+--------------------------+-----------+----------+---------
 backend_type   | text                     |           |          | 
 object         | text                     |           |          | 
 context        | text                     |           |          | 
 reads          | bigint                   |           |          | 
 read_time      | double precision         |           |          | 
 writes         | bigint                   |           |          | 
 write_time     | double precision         |           |          | 
 writebacks     | bigint                   |           |          | 
 writeback_time | double precision         |           |          | 
 extends        | bigint                   |           |          | 
 extend_time    | double precision         |           |          | 
 op_bytes       | bigint                   |           |          | 
 hits           | bigint                   |           |          | 
 evictions      | bigint                   |           |          | 
 reuses         | bigint                   |           |          | 
 fsyncs         | bigint                   |           |          | 
 fsync_time     | double precision         |           |          | 
 stats_reset    | timestamp with time zone |           |          |
    

文档: pg_stat_io

更改历史记录

示例

pg_stat_io 的示例内容,此处为简洁起见省略了 stats_reset

postgres=# SELECT backend_type, object, context, reads, writes, extends,
                  op_bytes, evictions, reuses, fsyncs
             FROM pg_stat_io;
    backend_type     |    object     |  context  | reads | writes | extends | op_bytes | evictions | reuses | fsyncs 
---------------------+---------------+-----------+-------+--------+---------+----------+-----------+--------+--------
 autovacuum launcher | relation      | bulkread  |     0 |      0 |         |     8192 |         0 |      0 |       
 autovacuum launcher | relation      | normal    |     0 |      0 |         |     8192 |         0 |        |      0
 autovacuum worker   | relation      | bulkread  |     0 |      0 |         |     8192 |         0 |      0 |       
 autovacuum worker   | relation      | normal    |   174 |      0 |       9 |     8192 |         0 |        |      0
 autovacuum worker   | relation      | vacuum    |   145 |      0 |       0 |     8192 |         0 |    108 |       
 client backend      | relation      | bulkread  |     0 |      0 |         |     8192 |         0 |      0 |       
 client backend      | relation      | bulkwrite |     0 |      0 |       0 |     8192 |         0 |      0 |       
 client backend      | relation      | normal    |   223 |      0 |       0 |     8192 |         0 |        |      0
 client backend      | relation      | vacuum    |     0 |      0 |       0 |     8192 |         0 |      0 |       
 client backend      | temp relation | normal    |     0 |      0 |       0 |     8192 |         0 |        |       
 background worker   | relation      | bulkread  |     0 |      0 |         |     8192 |         0 |      0 |       
 background worker   | relation      | bulkwrite |     0 |      0 |       0 |     8192 |         0 |      0 |       
 background worker   | relation      | normal    |     0 |      0 |       0 |     8192 |         0 |        |      0
 background worker   | relation      | vacuum    |     0 |      0 |       0 |     8192 |         0 |      0 |       
 background worker   | temp relation | normal    |     0 |      0 |       0 |     8192 |         0 |        |       
 background writer   | relation      | normal    |       |      0 |         |     8192 |           |        |      0
 checkpointer        | relation      | normal    |       |     74 |         |     8192 |           |        |      0
 standalone backend  | relation      | bulkread  |     0 |      0 |         |     8192 |         0 |      0 |       
 standalone backend  | relation      | bulkwrite |     0 |      0 |       8 |     8192 |         0 |      0 |       
 standalone backend  | relation      | normal    |   536 |   1011 |     663 |     8192 |         0 |        |      0
 standalone backend  | relation      | vacuum    |    10 |      0 |       0 |     8192 |         0 |      0 |       
 startup             | relation      | bulkread  |     0 |      0 |         |     8192 |         0 |      0 |       
 startup             | relation      | bulkwrite |     0 |      0 |       0 |     8192 |         0 |      0 |       
 startup             | relation      | normal    |     0 |      0 |       0 |     8192 |         0 |        |      0
 startup             | relation      | vacuum    |     0 |      0 |       0 |     8192 |         0 |      0 |       
 walsender           | relation      | bulkread  |     0 |      0 |         |     8192 |         0 |      0 |       
 walsender           | relation      | bulkwrite |     0 |      0 |       0 |     8192 |         0 |      0 |       
 walsender           | relation      | normal    |     0 |      0 |       0 |     8192 |         0 |        |      0
 walsender           | relation      | vacuum    |     0 |      0 |       0 |     8192 |         0 |      0 |       
 walsender           | temp relation | normal    |     0 |      0 |       0 |     8192 |         0 |        |       
(30 rows)

分类

统计/监控视图系统目录

另请参见

pg_stat_bgwriter

反馈

提交您对“pg_stat_io”的任何评论、建议或更正 此处