.. _sys_stat_progress_create_index:


sys_stat_progress_create_index
==============================

每个后台运行CREATE INDEX或REINDEX的后端都有一行，显示当前的进度。

.. table:: sys_stat_progress_create_index 视图
   :widths: 2 1 3
   :class: longtable

   +-------------------+--------+-----------------------------------------+
   | 列                | 类型   | 描述                                    |
   +===================+========+=========================================+
   | pid               | integer| 后端进程ID.                             |
   +-------------------+--------+-----------------------------------------+
   | datid             | oid    | 该后端连接的数据库的OID。               |
   +-------------------+--------+-----------------------------------------+
   | datname           | name   | 与此后端连接的数据库的名称。            |
   +-------------------+--------+-----------------------------------------+
   | relid             | oid    | 创建索引所依据的表的OID。               |
   +-------------------+--------+-----------------------------------------+
   | index_relid       | oid    | 被创建或重新索引的索引的OID。           |
   |                   |        | 在非当前的CREATE INDEX中，这个值为0。   |
   +-------------------+--------+-----------------------------------------+
   | command           | text   | 正在运行的命令：CREATE INDEX, CREATE    |
   |                   |        | INDEX CONCURRENTLY, REINDEX, 或 REINDEX |
   |                   |        | CONCURRENTLY.                           |
   +-------------------+--------+-----------------------------------------+
   | phase             | text   | 索引创建的当前处理阶段。                |
   +-------------------+--------+-----------------------------------------+
   | lockers_total     | bigint | 在适用的情况下，需要等待的储物柜总数。  |
   +-------------------+--------+-----------------------------------------+
   | lockers_done      | bigint | 已经等待的储物柜数量。                  |
   +-------------------+--------+-----------------------------------------+
   | current_locker_pid| bigint | 目前正在等待的储物柜的进程ID。          |
   +-------------------+--------+-----------------------------------------+
   | blocks_total      | bigint | 本阶段要处理的区块总数。                |
   +-------------------+--------+-----------------------------------------+
   | blocks_done       | bigint | 当前阶段已经处理的区块数量。            |
   +-------------------+--------+-----------------------------------------+
   | tuples_total      | bigint | 当前阶段要处理的元组总数。              |
   +-------------------+--------+-----------------------------------------+
   | tuples_done       | bigint | 在当前阶段已经处理的元组数量。          |
   +-------------------+--------+-----------------------------------------+
   | partitions_total  | bigint | 在分区表上创建索引时，该                |
   |                   |        | 列被设置为要在其上创建索引的分区总数。  |
   +-------------------+--------+-----------------------------------------+
   | partitions_done   | bigint | 当在分区表上创建索引时                  |
   |                   |        | ，该列被设置为在其上完成索引的分区数。  |
   +-------------------+--------+-----------------------------------------+
