@@ -346,7 +346,7 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser
346346
347347 <row>
348348 <entry><structname>pg_stat_progress_create_index</structname><indexterm><primary>pg_stat_progress_create_index</primary></indexterm></entry>
349- <entry>One row for each backend running <command>CREATE INDEX</command>, showing
349+ <entry>One row for each backend running <command>CREATE INDEX</command> or <command>REINDEX</command> , showing
350350 current progress.
351351 See <xref linkend='create-index-progress-reporting'/>.
352352 </entry>
@@ -3477,7 +3477,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid,
34773477 <title>CREATE INDEX Progress Reporting</title>
34783478
34793479 <para>
3480- Whenever <command>CREATE INDEX</command> is running, the
3480+ Whenever <command>CREATE INDEX</command> or <command>REINDEX</command> is running, the
34813481 <structname>pg_stat_progress_create_index</structname> view will contain
34823482 one row for each backend that is currently creating indexes. The tables
34833483 below describe the information that will be reported and provide information
@@ -3516,6 +3516,12 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid,
35163516 <entry><type>oid</type></entry>
35173517 <entry>OID of the table on which the index is being created.</entry>
35183518 </row>
3519+ <row>
3520+ <entry><structfield>index_relid</structfield></entry>
3521+ <entry><type>oid</type></entry>
3522+ <entry>OID of the index being created or reindexed. During a
3523+ non-concurrent <command>CREATE INDEX</command>, this is 0.</entry>
3524+ </row>
35193525 <row>
35203526 <entry><structfield>phase</structfield></entry>
35213527 <entry><type>text</type></entry>
@@ -3605,15 +3611,15 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid,
36053611 <row>
36063612 <entry><literal>initializing</literal></entry>
36073613 <entry>
3608- <command>CREATE INDEX</command> is preparing to create the index. This
3614+ <command>CREATE INDEX</command> or <command>REINDEX</command> is preparing to create the index. This
36093615 phase is expected to be very brief.
36103616 </entry>
36113617 </row>
36123618 <row>
3613- <entry><literal>waiting for old snapshots </literal></entry>
3619+ <entry><literal>waiting for writers before build </literal></entry>
36143620 <entry>
3615- <command>CREATE INDEX CONCURRENTLY</command> is waiting for transactions
3616- that can potentially see the table to release their snapshots .
3621+ <command>CREATE INDEX CONCURRENTLY</command> or <command>REINDEX CONCURRENTLY</command> is waiting for transactions
3622+ with write locks that can potentially see the table to finish .
36173623 This phase is skipped when not in concurrent mode.
36183624 Columns <structname>lockers_total</structname>, <structname>lockers_done</structname>
36193625 and <structname>current_locker_pid</structname> contain the progress
@@ -3632,10 +3638,10 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid,
36323638 </entry>
36333639 </row>
36343640 <row>
3635- <entry><literal>waiting for writer snapshots </literal></entry>
3641+ <entry><literal>waiting for writers before validation </literal></entry>
36363642 <entry>
3637- <command>CREATE INDEX CONCURRENTLY</command> is waiting for transactions
3638- that can potentially write into the table to release their snapshots .
3643+ <command>CREATE INDEX CONCURRENTLY</command> or <command>REINDEX CONCURRENTLY</command> is waiting for transactions
3644+ with write locks that can potentially write into the table to finish .
36393645 This phase is skipped when not in concurrent mode.
36403646 Columns <structname>lockers_total</structname>, <structname>lockers_done</structname>
36413647 and <structname>current_locker_pid</structname> contain the progress
@@ -3670,16 +3676,38 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid,
36703676 </entry>
36713677 </row>
36723678 <row>
3673- <entry><literal>waiting for reader snapshots</literal></entry>
3679+ <entry><literal>waiting for old snapshots</literal></entry>
36743680 <entry>
3675- <command>CREATE INDEX CONCURRENTLY</command> is waiting for transactions
3681+ <command>CREATE INDEX CONCURRENTLY</command> or <command>REINDEX CONCURRENTLY</command> is waiting for transactions
36763682 that can potentially see the table to release their snapshots. This
36773683 phase is skipped when not in concurrent mode.
36783684 Columns <structname>lockers_total</structname>, <structname>lockers_done</structname>
36793685 and <structname>current_locker_pid</structname> contain the progress
36803686 information for this phase.
36813687 </entry>
36823688 </row>
3689+ <row>
3690+ <entry><literal>waiting for readers before marking dead</literal></entry>
3691+ <entry>
3692+ <command>REINDEX CONCURRENTLY</command> is waiting for transactions
3693+ with read locks on the table to finish, before marking the old index dead.
3694+ This phase is skipped when not in concurrent mode.
3695+ Columns <structname>lockers_total</structname>, <structname>lockers_done</structname>
3696+ and <structname>current_locker_pid</structname> contain the progress
3697+ information for this phase.
3698+ </entry>
3699+ </row>
3700+ <row>
3701+ <entry><literal>waiting for readers before dropping</literal></entry>
3702+ <entry>
3703+ <command>REINDEX CONCURRENTLY</command> is waiting for transactions
3704+ with read locks on the table to finish, before dropping the old index.
3705+ This phase is skipped when not in concurrent mode.
3706+ Columns <structname>lockers_total</structname>, <structname>lockers_done</structname>
3707+ and <structname>current_locker_pid</structname> contain the progress
3708+ information for this phase.
3709+ </entry>
3710+ </row>
36833711 </tbody>
36843712 </tgroup>
36853713 </table>
0 commit comments