progress reporting for partitioned REINDEX - Mailing list pgsql-hackers

From Justin Pryzby
Subject progress reporting for partitioned REINDEX
Date
Msg-id 20210216064214.GI28165@telsasoft.com
Whole thread Raw
Responses Re: progress reporting for partitioned REINDEX
List pgsql-hackers
It looks like we missed this in a6642b3ae.

I think it's an odd behavior of pg_stat_progress_create_index to simultaneously
show the global progress as well as the progress for the current partition ...

It seems like for partitioned reindex, reindex_index() should set the AM, which
is used in the view:

src/backend/catalog/system_views.sql-                       WHEN 2 THEN 'building index' ||
src/backend/catalog/system_views.sql:                           COALESCE((': ' ||
pg_indexam_progress_phasename(S.param9::oid,S.param11)),
 

Maybe it needs a new flag, like:
params->options & REINDEXOPT_REPORT_PROGRESS_AM

I don't understand why e66bcfb4c added multiple calls to
pgstat_progress_start_command().

-- 
Justin

Attachment

pgsql-hackers by date:

Previous
From: Craig Ringer
Date:
Subject: libpq PQresultErrorMessage vs PQerrorMessage API issue
Next
From: Michael Paquier
Date:
Subject: Re: ERROR: invalid spinlock number: 0