Re: pgsql: Fix progress reporting of CLUSTER / VACUUM FULL - Mailing list pgsql-committers

From Amit Langote
Subject Re: pgsql: Fix progress reporting of CLUSTER / VACUUM FULL
Date
Msg-id CA+HiwqEaM2tV5awKhP1vSbgjQe_uXVU15Oi4sTgwgempwMiT8g@mail.gmail.com
Whole thread Raw
In response to pgsql: Fix progress reporting of CLUSTER / VACUUM FULL  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: pgsql: Fix progress reporting of CLUSTER / VACUUM FULL  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-committers
Hi Alvaro,

On Sat, Sep 14, 2019 at 2:59 AM Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
>
> Fix progress reporting of CLUSTER / VACUUM FULL
>
> The progress state was being clobbered once the first index completed
> being rebuilt, causing the final phases of the operation not show
> anything in the progress view.  This was inadvertently broken in
> 03f9e5cba0ee, which added progress tracking for REINDEX.

I noticed that the progress of REINDEX INDEX index_name is no longer
shown; REINDEX TABLE table_name is fine.  Maybe you missed updating
ReindexIndex() to pass the option to report progress, like this:

@@ -2350,7 +2350,8 @@ ReindexIndex(RangeVar *indexRelation, int
options, bool concurrent)
     if (concurrent)
         ReindexRelationConcurrently(indOid, options);
     else
-        reindex_index(indOid, false, persistence, options);
+        reindex_index(indOid, false, persistence,
+                      options | REINDEXOPT_REPORT_PROGRESS);
 }

Attached a patch.

Thanks,
Amit

Attachment

pgsql-committers by date:

Previous
From: Peter Eisentraut
Date:
Subject: pgsql: Remove mingwcompat.c
Next
From: Tom Lane
Date:
Subject: pgsql: Fix bogus handling of XQuery regex option flags.