.. _sys_stat_progress_cluster(KES):

sys_stat_progress_cluster
~~~~~~~~~~~~~~~~~~~~~~~~~~~

记录每个运行着CLUSTER或VACUUM FULL的进度。

.. table:: sys_stat_progress_cluster 列
   :widths: 1 1 3
   :class: longtable

   +---------------------+---------+---------------------------------------------------------------------------------------------+
   | 名称                | 类型    | 描述                                                                                        |
   +=====================+=========+=============================================================================================+
   | pid                 | integer | 后台的进程ID                                                                                |
   +---------------------+---------+---------------------------------------------------------------------------------------------+
   | datid               | oid     | 该后端连接的数据库的OID                                                                     |
   +---------------------+---------+---------------------------------------------------------------------------------------------+
   | datname             | name    | 与此后端连接的数据库的名称                                                                  |
   +---------------------+---------+---------------------------------------------------------------------------------------------+
   | relid               | oid     | 被聚类的表的OID                                                                             |
   +---------------------+---------+---------------------------------------------------------------------------------------------+
   | command             | text    | 正在运行的命令。CLUSTER或VACUUM FULL                                                        |
   +---------------------+---------+---------------------------------------------------------------------------------------------+
   | phase               | text    | 当前处理阶段                                                                                |
   +---------------------+---------+---------------------------------------------------------------------------------------------+
   | cluster_index_relid | oid     | 如果正在使用索引对表进行扫描，这就是正在使用的索引的OID；否则为0                            |
   +---------------------+---------+---------------------------------------------------------------------------------------------+
   | heap_tuples_scanned | bigint  | 扫描的堆元组数                                                                              |
   |                     |         |                                                                                             |
   |                     |         | 这个计数器只有在阶段为 seq scanning heap,index scanning heap or writing new heap时才会前进  |
   +---------------------+---------+---------------------------------------------------------------------------------------------+
   | heap_tuples_written | bigint  | 写入的堆元组的数量                                                                          |
   |                     |         |                                                                                             |
   |                     |         | 这个计数器只有在阶段为 seq scanning heap, index scanning heap or writing new heap时才会前进 |
   +---------------------+---------+---------------------------------------------------------------------------------------------+
   | heap_blks_total     | bigint  | 表中的堆块总数                                                                              |
   |                     |         |                                                                                             |
   |                     |         | 这个数字是在seq扫描堆的开始时报告的                                                         |
   +---------------------+---------+---------------------------------------------------------------------------------------------+
   | heap_blks_scanned   | bigint  | 扫描的堆块数量                                                                              |
   |                     |         |                                                                                             |
   |                     |         | 这个计数器只有在阶段为seq扫描堆时才会前进                                                   |
   +---------------------+---------+---------------------------------------------------------------------------------------------+
   | index_rebuild_count | bigint  | 重建的索引数                                                                                |
   |                     |         |                                                                                             |
   |                     |         | 该计数器仅在重建索引阶段时才会前进                                                          |
   +---------------------+---------+---------------------------------------------------------------------------------------------+
