Re: progress reporting for partitioned REINDEX

From: Justin Pryzby <pryzby(at)telsasoft(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Anastasia Lubennikova <a(dot)lubennikova(at)postgrespro(dot)ru>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Subject: Re: progress reporting for partitioned REINDEX
Date: 2021-02-17 16:24:37
Message-ID: 20210217162437.GD29749@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Feb 17, 2021 at 03:36:20PM +0900, Michael Paquier wrote:
> On Wed, Feb 17, 2021 at 12:10:43AM -0600, Justin Pryzby wrote:
> > On Wed, Feb 17, 2021 at 02:55:04PM +0900, Michael Paquier wrote:
> >> I see no bug here.
> >
> > pg_stat_progress_create_index includes partitions_{done,total} for
> > CREATE INDEX p, so isn't it strange if it wouldn't do likewise for
> > REINDEX INDEX p ?
>
> There is always room for improvement. This stuff applies now only
> when creating an index in the non-concurrent case because an index
> cannot be created on a partitioned table concurrently, and this
> behavior is documented as such. If we are going to improve this area,
> it seems to me that we may want to consider more cases than just the
> case of partitions, as it could also help the monitoring of REINDEX on
> schemas and databases.
>
> I don't think that this fits as an open item. That's just a different
> feature.

I see it as an omission in the existing feature.

Since v13, pg_stat_progress_create_index does progress reports for CREATE INDEX
(partitioned and nonpartitioned), and REINDEX of nonpartitioned tables.

When we implemented REINDEX of partitioned tables, it should've handled
progress reporting in the fields where that's reported for CREATE INDEX.
Or else we should document that "partitions_total/done are not populated for
REINDEX of a partitioned table as they are for CREATE INDEX".

--
Justin

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Cary Huang 2021-02-17 18:13:57 Re: Fix typo about WalSndPrepareWrite
Previous Message Tom Lane 2021-02-17 16:06:51 Re: Finding cause of test fails on the cfbot site