@@ -643,6 +643,10 @@ DefineIndex(ParseState *pstate,
643643 PROGRESS_CREATEIDX_COMMAND_CREATE_CONCURRENTLY :
644644 PROGRESS_CREATEIDX_COMMAND_CREATE );
645645 }
646+ else
647+ {
648+ pgstat_progress_update_param (PROGRESS_CREATEIDX_PARTITION_RELID , tableId );
649+ }
646650
647651 /*
648652 * No index OID to report yet
@@ -3791,9 +3795,10 @@ ReindexRelationConcurrently(const ReindexStmt *stmt, Oid relationOid, const Rein
37913795 PROGRESS_CREATEIDX_COMMAND ,
37923796 PROGRESS_CREATEIDX_PHASE ,
37933797 PROGRESS_CREATEIDX_INDEX_OID ,
3794- PROGRESS_CREATEIDX_ACCESS_METHOD_OID
3798+ PROGRESS_CREATEIDX_ACCESS_METHOD_OID ,
3799+ PROGRESS_CREATEIDX_PARTITION_RELID
37953800 };
3796- int64 progress_vals [4 ];
3801+ int64 progress_vals [5 ];
37973802
37983803 /*
37993804 * Create a memory context that will survive forced transaction commits we
@@ -4145,7 +4150,8 @@ ReindexRelationConcurrently(const ReindexStmt *stmt, Oid relationOid, const Rein
41454150 progress_vals [1 ] = 0 ; /* initializing */
41464151 progress_vals [2 ] = idx -> indexId ;
41474152 progress_vals [3 ] = idx -> amId ;
4148- pgstat_progress_update_multi_param (4 , progress_index , progress_vals );
4153+ progress_vals [4 ] = partition ? idx -> tableId : 0 ;
4154+ pgstat_progress_update_multi_param (5 , progress_index , progress_vals );
41494155
41504156 /* Choose a temporary relation name for the new index */
41514157 concurrentName = ChooseRelationName (get_rel_name (idx -> indexId ),
@@ -4323,7 +4329,8 @@ ReindexRelationConcurrently(const ReindexStmt *stmt, Oid relationOid, const Rein
43234329 progress_vals [1 ] = PROGRESS_CREATEIDX_PHASE_BUILD ;
43244330 progress_vals [2 ] = newidx -> indexId ;
43254331 progress_vals [3 ] = newidx -> amId ;
4326- pgstat_progress_update_multi_param (4 , progress_index , progress_vals );
4332+ progress_vals [4 ] = partition ? newidx -> tableId : 0 ;
4333+ pgstat_progress_update_multi_param (5 , progress_index , progress_vals );
43274334
43284335 /* Perform concurrent build of new index */
43294336 index_concurrently_build (newidx -> tableId , newidx -> indexId );
@@ -4390,7 +4397,8 @@ ReindexRelationConcurrently(const ReindexStmt *stmt, Oid relationOid, const Rein
43904397 progress_vals [1 ] = PROGRESS_CREATEIDX_PHASE_VALIDATE_IDXSCAN ;
43914398 progress_vals [2 ] = newidx -> indexId ;
43924399 progress_vals [3 ] = newidx -> amId ;
4393- pgstat_progress_update_multi_param (4 , progress_index , progress_vals );
4400+ progress_vals [4 ] = partition ? newidx -> tableId : 0 ;
4401+ pgstat_progress_update_multi_param (5 , progress_index , progress_vals );
43944402
43954403 validate_index (newidx -> tableId , newidx -> indexId , snapshot );
43964404
0 commit comments