pgsql: Fix index rebuild progress reporting for REPACK (CONCURRENTLY) - Mailing list pgsql-committers

From Fujii Masao
Subject pgsql: Fix index rebuild progress reporting for REPACK (CONCURRENTLY)
Date
Msg-id E1x6m7l-00000000ZFc-198c@gemulon.postgresql.org
Whole thread
Responses Re: pgsql: Fix index rebuild progress reporting for REPACK (CONCURRENTLY)
List pgsql-committers
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 <masao.fujii@gmail.com>
Reviewed-by: Álvaro Herrera <alvherre@kurilemu.de>
Discussion: https://postgr.es/m/CAHGQGwFUsrBvTurkSU8TEc=DZTunqteUXrasseqNMT7AMBZKRw@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(+)


pgsql-committers by date:

Previous
From: Fujii Masao
Date:
Subject: pgsql: Fix index rebuild progress reporting for REPACK (CONCURRENTLY)
Next
From: Alexander Korotkov
Date:
Subject: pgsql: Use the join collation when unique-ifying a semijoin's RHS