Fix index rebuild progress reporting for REPACK (CONCURRENTLY)

Previously, during REPACK (CONCURRENTLY), index_rebuild_count in
pg_stat_progress_repack and pg_stat_progress_cluster did not advance
as indexes were rebuilt. This made it impossible for users monitoring the
operation to tell how many indexes had been completed.

Fix this by incrementing the count after each index is built on the new
heap, so that both views report the number of completed index builds.

Author: Fujii Masao <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: 
https://postgr.es/m/CAHGQGwFUsrBvTurkSU8TEc=dztunqteuxrasseqnmt7ambz...@mail.gmail.com
Backpatch-through: 19

Branch
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/ccbea44294bb3813882052d14a6158302c4b19aa

Modified Files
--------------
src/backend/commands/repack.c | 2 ++
1 file changed, 2 insertions(+)

Reply via email to