{"Entry":{"collection":"catalog","key":"pg_stat_io","name":"pg_stat_io","aliases":[],"metadata":{"changed_in":["18"],"changes":[{"added":[],"attributes":[],"description_changed":false,"descriptions":[],"from":"15","order":false,"removed":[],"status":"added","to":"16","types":[]},{"added":[],"attributes":[],"description_changed":false,"descriptions":[{"from":"The context of an I/O operation. Possible values are:\n\nnormal: The default or standard context for a type of I/O operation. For example, by default, relation data is read into and written out from shared buffers. Thus, reads and writes of relation data to and from shared buffers are tracked in context normal. vacuum: I/O operations performed outside of shared buffers while vacuuming and analyzing permanent relations. Temporary table vacuums use the same local buffer pool as other temporary table IO operations and are tracked in context normal. bulkread: Certain large read I/O operations done outside of shared buffers, for example, a sequential scan of a large table. bulkwrite: Certain large write I/O operations done outside of shared buffers, such as COPY.","name":"context","to":"The context of an I/O operation. Possible values are:\n\nnormal: The default or standard context for a type of I/O operation. For example, by default, relation data is read into and written out from shared buffers. Thus, reads and writes of relation data to and from shared buffers are tracked in context normal. vacuum: I/O operations performed outside of shared buffers while vacuuming and analyzing permanent relations. Temporary table vacuums use the same local buffer pool as other temporary table I/O operations and are tracked in context normal. bulkread: Certain large read I/O operations done outside of shared buffers, for example, a sequential scan of a large table. bulkwrite: Certain large write I/O operations done outside of shared buffers, such as COPY."}],"from":"16","listing":[],"order":false,"removed":[],"status":"reworded","to":"17","types":[],"unlisted":[]},{"added":["read_bytes","write_bytes","extend_bytes"],"attributes":[],"description_changed":true,"descriptions":[{"from":"The context of an I/O operation. Possible values are:\n\nnormal: The default or standard context for a type of I/O operation. For example, by default, relation data is read into and written out from shared buffers. Thus, reads and writes of relation data to and from shared buffers are tracked in context normal. vacuum: I/O operations performed outside of shared buffers while vacuuming and analyzing permanent relations. Temporary table vacuums use the same local buffer pool as other temporary table I/O operations and are tracked in context normal. bulkread: Certain large read I/O operations done outside of shared buffers, for example, a sequential scan of a large table. bulkwrite: Certain large write I/O operations done outside of shared buffers, such as COPY.","name":"context","to":"The context of an I/O operation. Possible values are:\n\nnormal: The default or standard context for a type of I/O operation. For example, by default, relation data is read into and written out from shared buffers. Thus, reads and writes of relation data to and from shared buffers are tracked in context normal. init: I/O operations performed while creating the WAL segments are tracked in context init. vacuum: I/O operations performed outside of shared buffers while vacuuming and analyzing permanent relations. Temporary table vacuums use the same local buffer pool as other temporary table I/O operations and are tracked in context normal. bulkread: Certain large read I/O operations done outside of shared buffers, for example, a sequential scan of a large table. bulkwrite: Certain large write I/O operations done outside of shared buffers, such as COPY."},{"from":"Time spent in extend operations in milliseconds (if track_io_timing is enabled, otherwise zero)","name":"extend_time","to":"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)"},{"from":"Number of relation extend operations, each of the size specified in op_bytes.","name":"extends","to":"Number of relation extend operations."},{"from":"Time spent in fsync operations in milliseconds (if track_io_timing is enabled, otherwise zero)","name":"fsync_time","to":"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)"},{"from":"Target object of an I/O operation. Possible values are:\n\nrelation: Permanent relations. temp relation: Temporary relations.","name":"object","to":"Target object of an I/O operation. Possible values are:\n\nrelation: Permanent relations. temp relation: Temporary relations. wal: Write Ahead Logs."},{"from":"Time spent in read operations in milliseconds (if track_io_timing is enabled, otherwise zero)","name":"read_time","to":"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)"},{"from":"Number of read operations, each of the size specified in op_bytes.","name":"reads","to":"Number of read operations."},{"from":"Time spent in write operations in milliseconds (if track_io_timing is enabled, otherwise zero)","name":"write_time","to":"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)"},{"from":"Time spent in 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.","name":"writeback_time","to":"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."},{"from":"Number of units of size op_bytes which the process requested the kernel write out to permanent storage.","name":"writebacks","to":"Number of units of size BLCKSZ (typically 8kB) which the process requested the kernel write out to permanent storage."},{"from":"Number of write operations, each of the size specified in op_bytes.","name":"writes","to":"Number of write operations."}],"from":"17","listing":[],"order":false,"removed":["op_bytes"],"status":"changed","to":"18","types":[],"unlisted":[]},{"added":[],"attributes":[],"description_changed":false,"descriptions":[{"from":"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)","name":"read_time","to":"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). This may include time spent waiting for a read started by another backend. In that case reads may still be zero."}],"from":"18","listing":[],"order":false,"removed":[],"status":"reworded","to":"19","types":[],"unlisted":[]}],"column_count":20,"content_hash":"4b25f4398711ac7bc1efa215c96943a4df7effdb0eebfb8d6a5044facf358124","first_version":"16","imported_at":"2026-09-30T00:40:55.921368+08:00","kind":"statistics","last_version":"20","name":"pg_stat_io","position":91,"present_in":["16","17","18","19","20"],"relation_oid":null,"relkind":"v","shared":false,"source_rev":"english-manuals:a988e06d8d8fb9a062eea416969862905d48bb408de1758b55654bc39caebecc","summary":"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.","summary_zh":""}},"Definition":{"Collection":"catalog","Key":"pg_stat_io","SourceDatabase":"center","Version":"18","SourceTable":"catalog","SourceKey":"pg_stat_io","SourceRevision":"english-manuals:a988e06d8d8fb9a062eea416969862905d48bb408de1758b55654bc39caebecc","Facts":{"columns":[{"array_dimensions":0,"attnum":1,"description":"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.","description_zh":"","documented":true,"documented_name":"backend_type","hidden":false,"name":"backend_type","not_null":false,"references":"","type":"text","type_modifier":-1,"type_oid":25},{"array_dimensions":0,"attnum":2,"description":"Target object of an I/O operation. Possible values are:\n\nrelation: Permanent relations. temp relation: Temporary relations. wal: Write Ahead Logs.","description_zh":"","documented":true,"documented_name":"object","hidden":false,"name":"object","not_null":false,"references":"","type":"text","type_modifier":-1,"type_oid":25},{"array_dimensions":0,"attnum":3,"description":"The context of an I/O operation. Possible values are:\n\nnormal: The default or standard context for a type of I/O operation. For example, by default, relation data is read into and written out from shared buffers. Thus, reads and writes of relation data to and from shared buffers are tracked in context normal. init: I/O operations performed while creating the WAL segments are tracked in context init. vacuum: I/O operations performed outside of shared buffers while vacuuming and analyzing permanent relations. Temporary table vacuums use the same local buffer pool as other temporary table I/O operations and are tracked in context normal. bulkread: Certain large read I/O operations done outside of shared buffers, for example, a sequential scan of a large table. bulkwrite: Certain large write I/O operations done outside of shared buffers, such as COPY.","description_zh":"","documented":true,"documented_name":"context","hidden":false,"name":"context","not_null":false,"references":"","type":"text","type_modifier":-1,"type_oid":25},{"array_dimensions":0,"attnum":4,"description":"Number of read operations.","description_zh":"","documented":true,"documented_name":"reads","hidden":false,"name":"reads","not_null":false,"references":"","type":"bigint","type_modifier":-1,"type_oid":20},{"array_dimensions":0,"attnum":5,"description":"The total size of read operations in bytes.","description_zh":"","documented":true,"documented_name":"read_bytes","hidden":false,"name":"read_bytes","not_null":false,"references":"","type":"numeric","type_modifier":-1,"type_oid":1700},{"array_dimensions":0,"attnum":6,"description":"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)","description_zh":"","documented":true,"documented_name":"read_time","hidden":false,"name":"read_time","not_null":false,"references":"","type":"double precision","type_modifier":-1,"type_oid":701},{"array_dimensions":0,"attnum":7,"description":"Number of write operations.","description_zh":"","documented":true,"documented_name":"writes","hidden":false,"name":"writes","not_null":false,"references":"","type":"bigint","type_modifier":-1,"type_oid":20},{"array_dimensions":0,"attnum":8,"description":"The total size of write operations in bytes.","description_zh":"","documented":true,"documented_name":"write_bytes","hidden":false,"name":"write_bytes","not_null":false,"references":"","type":"numeric","type_modifier":-1,"type_oid":1700},{"array_dimensions":0,"attnum":9,"description":"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)","description_zh":"","documented":true,"documented_name":"write_time","hidden":false,"name":"write_time","not_null":false,"references":"","type":"double precision","type_modifier":-1,"type_oid":701},{"array_dimensions":0,"attnum":10,"description":"Number of units of size BLCKSZ (typically 8kB) which the process requested the kernel write out to permanent storage.","description_zh":"","documented":true,"documented_name":"writebacks","hidden":false,"name":"writebacks","not_null":false,"references":"","type":"bigint","type_modifier":-1,"type_oid":20},{"array_dimensions":0,"attnum":11,"description":"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.","description_zh":"","documented":true,"documented_name":"writeback_time","hidden":false,"name":"writeback_time","not_null":false,"references":"","type":"double precision","type_modifier":-1,"type_oid":701},{"array_dimensions":0,"attnum":12,"description":"Number of relation extend operations.","description_zh":"","documented":true,"documented_name":"extends","hidden":false,"name":"extends","not_null":false,"references":"","type":"bigint","type_modifier":-1,"type_oid":20},{"array_dimensions":0,"attnum":13,"description":"The total size of relation extend operations in bytes.","description_zh":"","documented":true,"documented_name":"extend_bytes","hidden":false,"name":"extend_bytes","not_null":false,"references":"","type":"numeric","type_modifier":-1,"type_oid":1700},{"array_dimensions":0,"attnum":14,"description":"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)","description_zh":"","documented":true,"documented_name":"extend_time","hidden":false,"name":"extend_time","not_null":false,"references":"","type":"double precision","type_modifier":-1,"type_oid":701},{"array_dimensions":0,"attnum":15,"description":"The number of times a desired block was found in a shared buffer.","description_zh":"","documented":true,"documented_name":"hits","hidden":false,"name":"hits","not_null":false,"references":"","type":"bigint","type_modifier":-1,"type_oid":20},{"array_dimensions":0,"attnum":16,"description":"Number of times a block has been written out from a shared or local buffer in order to make it available for another use.\n\nIn 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.","description_zh":"","documented":true,"documented_name":"evictions","hidden":false,"name":"evictions","not_null":false,"references":"","type":"bigint","type_modifier":-1,"type_oid":20},{"array_dimensions":0,"attnum":17,"description":"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.","description_zh":"","documented":true,"documented_name":"reuses","hidden":false,"name":"reuses","not_null":false,"references":"","type":"bigint","type_modifier":-1,"type_oid":20},{"array_dimensions":0,"attnum":18,"description":"Number of fsync calls. These are only tracked in context normal.","description_zh":"","documented":true,"documented_name":"fsyncs","hidden":false,"name":"fsyncs","not_null":false,"references":"","type":"bigint","type_modifier":-1,"type_oid":20},{"array_dimensions":0,"attnum":19,"description":"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)","description_zh":"","documented":true,"documented_name":"fsync_time","hidden":false,"name":"fsync_time","not_null":false,"references":"","type":"double precision","type_modifier":-1,"type_oid":701},{"array_dimensions":0,"attnum":20,"description":"Time at which these statistics were last reset.","description_zh":"","documented":true,"documented_name":"stats_reset","hidden":false,"name":"stats_reset","not_null":false,"references":"","type":"timestamp with time zone","type_modifier":-1,"type_oid":1184}],"description":"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. Combinations which do not make sense are omitted.\n\nCurrently, I/O on relations (e.g. tables, indexes) and WAL activity are tracked. However, relation I/O which bypasses shared buffers (e.g. when moving a table from one tablespace to another) is currently not tracked.","description_zh":"","doc":{"anchor":"PG-STAT-IO-VIEW","file":"monitoring-stats.html","lang":"en","sha256":"aa979eed08627fbf715a9d792094a162a73671db5af810f3ab2aad3e073d5722","slug":"18"},"kind":"statistics","lang":"en","measured_attributes":true,"metadata_release":"18.6","runtime_columns":["backend_type","object","context","reads","read_bytes","read_time","writes","write_bytes","write_time","writebacks","writeback_time","extends","extend_bytes","extend_time","hits","evictions","reuses","fsyncs","fsync_time","stats_reset"],"runtime_verified":false,"source":"english-manual"},"ManualEvidence":{"doc":{"anchor":"PG-STAT-IO-VIEW","file":"monitoring-stats.html","lang":"en","sha256":"aa979eed08627fbf715a9d792094a162a73671db5af810f3ab2aad3e073d5722","slug":"18"}},"MeasuredEvidence":{"measured_attributes":true,"metadata_release":"18.6","runtime_columns":["backend_type","object","context","reads","read_bytes","read_time","writes","write_bytes","write_time","writebacks","writeback_time","extends","extend_bytes","extend_time","hits","evictions","reuses","fsyncs","fsync_time","stats_reset"],"runtime_verified":false}},"Text":{"Collection":"catalog","Key":"pg_stat_io","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"pg_stat_io","Summary":"pg_stat_io 视图对每种后端类型、目标 I/O 对象和 I/O 上下文的组合各提供一行，显示整个集簇范围内的 I/O 统计信息。没有意义的组合会被省略。\n\n目前会跟踪关系（例如表、索引）的 I/O 以及 WAL 活动。不过，绕过共享缓冲区的关系 I/O（例如将表从一个表空间移动到另一个表空间时）目前不会被跟踪。","BodyHTML":"\u003cp\u003epg_stat_io 视图对每种后端类型、目标 I/O 对象和 I/O 上下文的组合各提供一行，显示整个集簇范围内的 I/O 统计信息。没有意义的组合会被省略。\n\n目前会跟踪关系（例如表、索引）的 I/O 以及 WAL 活动。不过，绕过共享缓冲区的关系 I/O（例如将表从一个表空间移动到另一个表空间时）目前不会被跟踪。\u003c/p\u003e","SourceRevision":"2026-09-27@419045e","ContentHash":"18a34a62e059bcf96358d0412e917cca613c43d0b0bf6fb7153260773ec28c3f","Payload":{"columns":[{"description_zh":"后端类型（例如后台工作进程、自动清理工作进程）。有关 backend_type 的更多信息，请参阅pg_stat_activity。某些 backend_type 不会累积 I/O 操作统计信息，因此不会出现在该视图中。","name":"backend_type","type":"text","zh_from":"doc"},{"description_zh":"I/O 操作的目标对象。可能的值有：","name":"object","type":"text","zh_from":"doc"},{"description_zh":"I/O 操作的上下文。可能的值有：","name":"context","type":"text","zh_from":"doc"},{"description_zh":"读取操作的数量。","name":"reads","type":"bigint","zh_from":"doc"},{"description_zh":"读取操作的总大小（以字节为单位）。","name":"read_bytes","type":"numeric","zh_from":"doc"},{"description_zh":"等待读取操作所花费的时间，以毫秒计（如果启用了track_io_timing且 object 不是 wal，或者启用了track_wal_io_timing且 object 是 wal；否则为零）。","name":"read_time","type":"double precision","zh_from":"doc"},{"description_zh":"写入操作的数量。","name":"writes","type":"bigint","zh_from":"doc"},{"description_zh":"写入操作的总大小（以字节为单位）。","name":"write_bytes","type":"numeric","zh_from":"doc"},{"description_zh":"等待写入操作所花费的时间，以毫秒计（如果启用了track_io_timing且 object 不是 wal，或者启用了track_wal_io_timing且 object 是 wal；否则为零）。","name":"write_time","type":"double precision","zh_from":"doc"},{"description_zh":"进程请求内核写出到永久存储的、大小为 BLCKSZ（通常为 8kB）的单位数量。","name":"writebacks","type":"bigint","zh_from":"doc"},{"description_zh":"等待写回操作所花费的时间，以毫秒计（如果启用了track_io_timing，否则为零）。这包括排队写出请求所花费的时间，以及可能实际写出脏数据所花费的时间。","name":"writeback_time","type":"double precision","zh_from":"doc"},{"description_zh":"关系扩展操作的数量。","name":"extends","type":"bigint","zh_from":"doc"},{"description_zh":"关系扩展操作的总大小（以字节为单位）。","name":"extend_bytes","type":"numeric","zh_from":"doc"},{"description_zh":"等待扩展操作所花费的时间，以毫秒计（如果启用了track_io_timing且 object 不是 wal，或者启用了track_wal_io_timing且 object 是 wal；否则为零）。","name":"extend_time","type":"double precision","zh_from":"doc"},{"description_zh":"在共享缓冲区中找到所需块的次数。","name":"hits","type":"bigint","zh_from":"doc"},{"description_zh":"为了腾出空间供其他用途而将块从共享或本地缓冲区写出的次数。\n\n在 context 为 normal 时，这会统计块从缓冲区中被驱逐并由另一个块替换的次数。在 context 为 bulkwrite、bulkread 和 vacuum 时，这会统计块从共享缓冲区中被驱逐，从而把该共享缓冲区加入到单独的、大小受限的环形缓冲区中以供批量 I/O 操作使用的次数。","name":"evictions","type":"bigint","zh_from":"doc"},{"description_zh":"在 bulkread、bulkwrite 或 vacuum 这些 context 中，作为 I/O 操作一部分，位于共享缓冲区之外的大小受限环形缓冲区中已有缓冲区被重用的次数。","name":"reuses","type":"bigint","zh_from":"doc"},{"description_zh":"fsync 调用次数。这些只会在 context 为 normal 时被跟踪。","name":"fsyncs","type":"bigint","zh_from":"doc"},{"description_zh":"等待 fsync 操作所花费的时间，以毫秒计（如果启用了track_io_timing且 object 不是 wal，或者启用了track_wal_io_timing且 object 是 wal；否则为零）。","name":"fsync_time","type":"double precision","zh_from":"doc"},{"description_zh":"这些统计信息上次被重置的时间。","name":"stats_reset","type":"timestamp with time zone","zh_from":"doc"}],"description_zh":"pg_stat_io 视图对每种后端类型、目标 I/O 对象和 I/O 上下文的组合各提供一行，显示整个集簇范围内的 I/O 统计信息。没有意义的组合会被省略。\n\n目前会跟踪关系（例如表、索引）的 I/O 以及 WAL 活动。不过，绕过共享缓冲区的关系 I/O（例如将表从一个表空间移动到另一个表空间时）目前不会被跟踪。","zh_from":"doc"}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["16","17","18","19","20"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
