{"Entry":{"collection":"catalog","key":"pg_stat_progress_vacuum","name":"pg_stat_progress_vacuum","aliases":[],"metadata":{"changed_in":["17","18","19"],"changes":[{"added":[],"attributes":[],"description_changed":false,"descriptions":[],"from":"9.5","order":false,"removed":[],"status":"added","to":"9.6","types":[]},{"added":[],"attributes":[],"description_changed":false,"descriptions":[{"from":"Current processing phase of vacuum. See Table 28-21.","name":"phase","to":"Current processing phase of vacuum. See Table 28.22."}],"from":"9.6","listing":[],"order":false,"removed":[],"status":"reworded","to":"10","types":[],"unlisted":[]},{"added":[],"attributes":[],"description_changed":true,"descriptions":[{"from":"Current processing phase of vacuum. See Table 28.22.","name":"phase","to":"Current processing phase of vacuum. See Table 27.25."}],"from":"11","listing":[],"order":false,"removed":[],"status":"reworded","to":"12","types":[],"unlisted":[]},{"added":[],"attributes":[],"description_changed":true,"descriptions":[{"from":"Current processing phase of vacuum. See Table 27.25.","name":"phase","to":"Current processing phase of vacuum. See Table 27.37."}],"from":"12","listing":[],"order":false,"removed":[],"status":"reworded","to":"13","types":[],"unlisted":[]},{"added":[],"attributes":[],"description_changed":true,"descriptions":[{"from":"Current processing phase of vacuum. See Table 27.37.","name":"phase","to":"Current processing phase of vacuum. See Table 28.39."}],"from":"13","listing":[],"order":false,"removed":[],"status":"reworded","to":"14","types":[],"unlisted":[]},{"added":[],"attributes":[],"description_changed":false,"descriptions":[{"from":"Current processing phase of vacuum. See Table 28.39.","name":"phase","to":"Current processing phase of vacuum. See Table 28.41."}],"from":"14","listing":[],"order":false,"removed":[],"status":"reworded","to":"15","types":[],"unlisted":[]},{"added":[],"attributes":[],"description_changed":true,"descriptions":[{"from":"Current processing phase of vacuum. See Table 28.41.","name":"phase","to":"Current processing phase of vacuum. See Table 28.45."}],"from":"15","listing":[],"order":false,"removed":[],"status":"reworded","to":"16","types":[],"unlisted":[]},{"added":["max_dead_tuple_bytes","dead_tuple_bytes","num_dead_item_ids","indexes_total","indexes_processed"],"attributes":[],"description_changed":true,"descriptions":[{"from":"Current processing phase of vacuum. See Table 28.45.","name":"phase","to":"Current processing phase of vacuum. See Table 27.46."}],"from":"16","listing":[],"order":false,"removed":["max_dead_tuples","num_dead_tuples"],"status":"changed","to":"17","types":[],"unlisted":[]},{"added":["delay_time"],"attributes":[],"description_changed":false,"descriptions":[],"from":"17","listing":[],"order":false,"removed":[],"status":"changed","to":"18","types":[],"unlisted":[]},{"added":["mode","started_by"],"attributes":[],"description_changed":true,"descriptions":[{"from":"Current processing phase of vacuum. See Table 27.46.","name":"phase","to":"Current processing phase of vacuum. See Table 27.51."}],"from":"18","listing":[],"order":false,"removed":[],"status":"changed","to":"19","types":[],"unlisted":[]},{"added":[],"attributes":[],"description_changed":false,"descriptions":[{"from":"Current processing phase of vacuum. See Table 27.51.","name":"phase","to":"Current processing phase of vacuum. See Table 27.52."}],"from":"19","listing":[],"order":false,"removed":[],"status":"reworded","to":"20","types":[],"unlisted":[]}],"column_count":17,"content_hash":"9e19596bf5e8b0280dc634596391f7f9487e3b3e4075e678a95c419d060c120f","first_version":"9.6","imported_at":"2026-09-30T00:40:55.955234+08:00","kind":"progress","last_version":"20","name":"pg_stat_progress_vacuum","position":101,"present_in":["9.6","10","11","12","13","14","15","16","17","18","19","20"],"relation_oid":null,"relkind":"v","shared":false,"source_rev":"english-manuals:f0dd8219b0013a4fd9977417d3a14bc74dee685e280c664fb69ec89c8f679c63","summary":"Whenever VACUUM is running, the pg_stat_progress_vacuum view will contain one row for each backend (including autovacuum worker processes) that is currently vacuuming.","summary_zh":""}},"Definition":{"Collection":"catalog","Key":"pg_stat_progress_vacuum","SourceDatabase":"center","Version":"18","SourceTable":"catalog","SourceKey":"pg_stat_progress_vacuum","SourceRevision":"english-manuals:f0dd8219b0013a4fd9977417d3a14bc74dee685e280c664fb69ec89c8f679c63","Facts":{"columns":[{"array_dimensions":0,"attnum":1,"description":"Process ID of backend.","description_zh":"","documented":true,"documented_name":"pid","hidden":false,"name":"pid","not_null":false,"references":"","type":"integer","type_modifier":-1,"type_oid":23},{"array_dimensions":0,"attnum":2,"description":"OID of the database to which this backend is connected.","description_zh":"","documented":true,"documented_name":"datid","hidden":false,"name":"datid","not_null":false,"references":"","type":"oid","type_modifier":-1,"type_oid":26},{"array_dimensions":0,"attnum":3,"description":"Name of the database to which this backend is connected.","description_zh":"","documented":true,"documented_name":"datname","hidden":false,"name":"datname","not_null":false,"references":"","type":"name","type_modifier":-1,"type_oid":19},{"array_dimensions":0,"attnum":4,"description":"OID of the table being vacuumed.","description_zh":"","documented":true,"documented_name":"relid","hidden":false,"name":"relid","not_null":false,"references":"","type":"oid","type_modifier":-1,"type_oid":26},{"array_dimensions":0,"attnum":5,"description":"Current processing phase of vacuum. See Table 27.46.","description_zh":"","documented":true,"documented_name":"phase","hidden":false,"name":"phase","not_null":false,"references":"","type":"text","type_modifier":-1,"type_oid":25},{"array_dimensions":0,"attnum":6,"description":"Total number of heap blocks in the table. This number is reported as of the beginning of the scan; blocks added later will not be (and need not be) visited by this VACUUM.","description_zh":"","documented":true,"documented_name":"heap_blks_total","hidden":false,"name":"heap_blks_total","not_null":false,"references":"","type":"bigint","type_modifier":-1,"type_oid":20},{"array_dimensions":0,"attnum":7,"description":"Number of heap blocks scanned. Because the visibility map is used to optimize scans, some blocks will be skipped without inspection; skipped blocks are included in this total, so that this number will eventually become equal to heap_blks_total when the vacuum is complete. This counter only advances when the phase is scanning heap.","description_zh":"","documented":true,"documented_name":"heap_blks_scanned","hidden":false,"name":"heap_blks_scanned","not_null":false,"references":"","type":"bigint","type_modifier":-1,"type_oid":20},{"array_dimensions":0,"attnum":8,"description":"Number of heap blocks vacuumed. Unless the table has no indexes, this counter only advances when the phase is vacuuming heap. Blocks that contain no dead tuples are skipped, so the counter may sometimes skip forward in large increments.","description_zh":"","documented":true,"documented_name":"heap_blks_vacuumed","hidden":false,"name":"heap_blks_vacuumed","not_null":false,"references":"","type":"bigint","type_modifier":-1,"type_oid":20},{"array_dimensions":0,"attnum":9,"description":"Number of completed index vacuum cycles.","description_zh":"","documented":true,"documented_name":"index_vacuum_count","hidden":false,"name":"index_vacuum_count","not_null":false,"references":"","type":"bigint","type_modifier":-1,"type_oid":20},{"array_dimensions":0,"attnum":10,"description":"Amount of dead tuple data that we can store before needing to perform an index vacuum cycle, based on maintenance_work_mem.","description_zh":"","documented":true,"documented_name":"max_dead_tuple_bytes","hidden":false,"name":"max_dead_tuple_bytes","not_null":false,"references":"","type":"bigint","type_modifier":-1,"type_oid":20},{"array_dimensions":0,"attnum":11,"description":"Amount of dead tuple data collected since the last index vacuum cycle.","description_zh":"","documented":true,"documented_name":"dead_tuple_bytes","hidden":false,"name":"dead_tuple_bytes","not_null":false,"references":"","type":"bigint","type_modifier":-1,"type_oid":20},{"array_dimensions":0,"attnum":12,"description":"Number of dead item identifiers collected since the last index vacuum cycle.","description_zh":"","documented":true,"documented_name":"num_dead_item_ids","hidden":false,"name":"num_dead_item_ids","not_null":false,"references":"","type":"bigint","type_modifier":-1,"type_oid":20},{"array_dimensions":0,"attnum":13,"description":"Total number of indexes that will be vacuumed or cleaned up. This number is reported at the beginning of the vacuuming indexes phase or the cleaning up indexes phase.","description_zh":"","documented":true,"documented_name":"indexes_total","hidden":false,"name":"indexes_total","not_null":false,"references":"","type":"bigint","type_modifier":-1,"type_oid":20},{"array_dimensions":0,"attnum":14,"description":"Number of indexes processed. This counter only advances when the phase is vacuuming indexes or cleaning up indexes.","description_zh":"","documented":true,"documented_name":"indexes_processed","hidden":false,"name":"indexes_processed","not_null":false,"references":"","type":"bigint","type_modifier":-1,"type_oid":20},{"array_dimensions":0,"attnum":15,"description":"Total time spent sleeping due to cost-based delay (see Section 19.10.2), in milliseconds (if track_cost_delay_timing is enabled, otherwise zero). This includes the time that any associated parallel workers have slept. However, parallel workers report their sleep time no more frequently than once per second, so the reported value may be slightly stale.","description_zh":"","documented":true,"documented_name":"delay_time","hidden":false,"name":"delay_time","not_null":false,"references":"","type":"double precision","type_modifier":-1,"type_oid":701}],"description":"Whenever VACUUM is running, the pg_stat_progress_vacuum view will contain one row for each backend (including autovacuum worker processes) that is currently vacuuming. The tables below describe the information that will be reported and provide information about how to interpret it. Progress for VACUUM FULL commands is reported via pg_stat_progress_cluster because both VACUUM FULL and CLUSTER rewrite the table, while regular VACUUM only modifies it in place. See Section 27.4.2.","description_zh":"","doc":{"anchor":"PG-STAT-PROGRESS-VACUUM-VIEW","file":"progress-reporting.html","lang":"en","sha256":"a1f46d2b670502bfe75f1cf5192050ef2ef68202a8f928c4915abea0f4f71ae6","slug":"18"},"kind":"progress","lang":"en","measured_attributes":true,"metadata_release":"18.6","runtime_columns":["pid","datid","datname","relid","phase","heap_blks_total","heap_blks_scanned","heap_blks_vacuumed","index_vacuum_count","max_dead_tuple_bytes","dead_tuple_bytes","num_dead_item_ids","indexes_total","indexes_processed","delay_time"],"runtime_verified":false,"source":"english-manual"},"ManualEvidence":{"doc":{"anchor":"PG-STAT-PROGRESS-VACUUM-VIEW","file":"progress-reporting.html","lang":"en","sha256":"a1f46d2b670502bfe75f1cf5192050ef2ef68202a8f928c4915abea0f4f71ae6","slug":"18"}},"MeasuredEvidence":{"measured_attributes":true,"metadata_release":"18.6","runtime_columns":["pid","datid","datname","relid","phase","heap_blks_total","heap_blks_scanned","heap_blks_vacuumed","index_vacuum_count","max_dead_tuple_bytes","dead_tuple_bytes","num_dead_item_ids","indexes_total","indexes_processed","delay_time"],"runtime_verified":false}},"Text":{"Collection":"catalog","Key":"pg_stat_progress_vacuum","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"pg_stat_progress_vacuum","Summary":"只要VACUUM正在运行，pg_stat_progress_vacuum视图就会为每个当前正在清理的后端（包括自动清理工作进程）包含一行。下表描述了将报告的信息，并说明如何解释这些信息。VACUUM FULL命令的进度通过pg_stat_progress_cluster报告，因为VACUUM FULL和CLUSTER都会重写表，而常规的VACUUM只会原地修改表。参见第 27.4.2 节。","BodyHTML":"\u003cp\u003e只要VACUUM正在运行，pg_stat_progress_vacuum视图就会为每个当前正在清理的后端（包括自动清理工作进程）包含一行。下表描述了将报告的信息，并说明如何解释这些信息。VACUUM FULL命令的进度通过pg_stat_progress_cluster报告，因为VACUUM FULL和CLUSTER都会重写表，而常规的VACUUM只会原地修改表。参见第 27.4.2 节。\u003c/p\u003e","SourceRevision":"2026-09-27@419045e","ContentHash":"a8b95bb1e7c29ff73f0e31d5f735326b011a10c9cddfdc18dd7a5b8c02b9f6cc","Payload":{"columns":[{"description_zh":"后端的进程ID。","name":"pid","type":"integer","zh_from":"doc"},{"description_zh":"后端连接到的数据库的OID。","name":"datid","type":"oid","zh_from":"doc"},{"description_zh":"后端连接到的数据库的名称。","name":"datname","type":"name","zh_from":"doc"},{"description_zh":"正在清理的表的OID。","name":"relid","type":"oid","zh_from":"doc"},{"description_zh":"清理的当前处理阶段。参见表 27.46。","name":"phase","type":"text","zh_from":"doc"},{"description_zh":"该表中堆块的总数。这个数字以扫描开始时的数量为准，之后增加的块将不会（并且不需要）被这个VACUUM访问。","name":"heap_blks_total","type":"bigint","zh_from":"doc"},{"description_zh":"被扫描的堆块数量。由于可见性映射被用来优化扫描，一些块将被跳过而不做检查，被跳过的块会被包括在这个总数中，因此当清理完成时这个数字最终将会等于heap_blks_total。仅当处于scanning heap阶段时这个计数器才会前进。","name":"heap_blks_scanned","type":"bigint","zh_from":"doc"},{"description_zh":"被清理的堆块数量。除非表没有索引，这个计数器仅在处于vacuuming heap阶段时才会前进。不包含死亡元组的块会被跳过，因此这个计数器有时可能会大幅跳增。","name":"heap_blks_vacuumed","type":"bigint","zh_from":"doc"},{"description_zh":"已完成的索引清理周期数。","name":"index_vacuum_count","type":"bigint","zh_from":"doc"},{"description_zh":"在需要执行索引清理周期之前可存储的死亡元组数据量，取决于maintenance_work_mem。","name":"max_dead_tuple_bytes","type":"bigint","zh_from":"doc"},{"description_zh":"自上一个索引清理周期以来收集到的死亡元组数据量。","name":"dead_tuple_bytes","type":"bigint","zh_from":"doc"},{"description_zh":"自上一个索引清理周期以来收集到的死项标识符数量。","name":"num_dead_item_ids","type":"bigint","zh_from":"doc"},{"description_zh":"将要执行清理或收尾清理的索引总数。该数字会在 vacuuming indexes 或 cleaning up indexes 阶段开始时报告。","name":"indexes_total","type":"bigint","zh_from":"doc"},{"description_zh":"已处理的索引数量。该计数器只会在 vacuuming indexes 或 cleaning up indexes 阶段推进。","name":"indexes_processed","type":"bigint","zh_from":"doc"},{"description_zh":"因基于代价的延迟而睡眠的总时间（参见第 19.10.2 节），以毫秒计（如果启用了track_cost_delay_timing，否则为零）。这包括任何相关并行工作进程的睡眠时间；不过，并行工作进程最多每秒才会上报一次自己的睡眠时间，因此该值可能略有滞后。","name":"delay_time","type":"double precision","zh_from":"doc"}],"description_zh":"只要VACUUM正在运行，pg_stat_progress_vacuum视图就会为每个当前正在清理的后端（包括自动清理工作进程）包含一行。下表描述了将报告的信息，并说明如何解释这些信息。VACUUM FULL命令的进度通过pg_stat_progress_cluster报告，因为VACUUM FULL和CLUSTER都会重写表，而常规的VACUUM只会原地修改表。参见第 27.4.2 节。","zh_from":"doc"}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","9.6"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
