<structfield>heap_blks_scanned</structfield> <type>bigint</type>
</para>
<para>
Number of heap blocks scanned. This counter only advances when the
phase is <literal>seq scanning heap</literal>.
</para></entry>
</row>
<row>
<entry role="catalog_table_entry"><para role="column_definition">
<structfield>index_rebuild_count</structfield> <type>bigint</type>
</para>
<para>
Number of indexes rebuilt. This counter only advances when the phase
is <literal>rebuilding index</literal>.
</para></entry>
</row>
</tbody>
</tgroup>
</table>
<table id="cluster-phases">
<title>CLUSTER and VACUUM FULL Phases</title>
<tgroup cols="2">
<colspec colname="col1" colwidth="1*"/>
<colspec colname="col2" colwidth="2*"/>
<thead>
<row>
<entry>Phase</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry><literal>initializing</literal></entry>
<entry>
The command is preparing to begin scanning the heap. This phase is
expected to be very brief.
</entry>
</row>
<row>
<entry><literal>seq scanning heap</literal></entry>
<entry>
The command is currently scanning the table using a sequential scan.
</entry>
</row>
<row>
<entry><literal>index scanning heap</literal></entry>
<entry>
<command>CLUSTER</command> is currently scanning the table using an index scan.
</entry>
</row>
<row>
<entry><literal>sorting tuples</literal></entry>
<entry>
<command>CLUSTER</command> is currently sorting tuples.
</entry>
</row>
<row>
<entry><literal>writing new heap</literal></entry>
<entry>
<command>CLUSTER</command> is currently writing the new heap.
</entry>
</row>
<row>
<entry><literal>swapping relation files</literal></entry>
<entry>
The command is currently swapping newly-built files into place.
</entry>
</row>
<row>
<entry><literal>rebuilding index</literal></entry>
<entry>
The command is currently rebuilding an index.
</entry>
</row>
<row>
<entry><literal>performing final cleanup</literal></entry>
<entry>
The command is performing final cleanup. When this phase is
completed, <command>CLUSTER</command>
or <command>VACUUM FULL</command> will end.
</entry>
</row>
</tbody>
</tgroup>
</table>
</sect2>
<sect2 id="copy-progress-reporting">
<title>COPY Progress Reporting</title>
<indexterm>
<primary>pg_stat_progress_copy</primary>
</indexterm>
<para>
Whenever <command>COPY</command> is running, the
<structname>pg_stat_progress_copy</structname> view will contain one row
for each backend that is currently running a <command>COPY</command> command.
The table below describes the information that will be reported and provides
information about how to interpret it.
</para>
<table id="pg-stat-progress-copy-view" xreflabel="pg_stat_progress_copy">
<title><structname>pg_stat_progress_copy</structname> View</title>
<tgroup cols="1">
<thead>
<row>
<entry role="catalog_table_entry"><para role="column_definition">
Column Type
</para>
<para>
Description
</para></entry>
</row>
</thead>
<tbody>
<row>
<entry role="catalog_table_entry"><para role="column_definition">
<structfield>pid</structfield> <type>integer</type>
</para>
<para>
Process ID of backend.
</para></entry>
</row>
<row>
<entry role="catalog_table_entry"><para role="column_definition">
<structfield>datid</structfield> <type>oid</type>
</para>
<para>
OID of the database to which this backend is connected.
</para></entry>
</row>
<row>
<entry role="catalog_table_entry"><para role="column_definition">