}
  #endif                         /* BTREE_BUILD_STATS */
  
 +   /* Execute the sort */
     pgstat_progress_update_param(PROGRESS_CREATEIDX_SUBPHASE,
                                  PROGRESS_BTREE_PHASE_PERFORMSORT_1);
     tuplesort_performsort(btspool->sortstate);
                                         true, progress, _bt_build_callback,
                                        (void *) &buildstate, scan);
  
 -   /*
 -    * Execute this worker's part of the sort.
 -    *
 -    * Unlike leader and serial cases, we cannot avoid calling
 -    * tuplesort_performsort() for spool2 if it ends up containing no dead
 -    * tuples (this is disallowed for workers by tuplesort).
 -    */
 +   /* Execute this worker's part of the sort */
 +   if (progress)
 +       pgstat_progress_update_param(PROGRESS_CREATEIDX_SUBPHASE,
 +                                    PROGRESS_BTREE_PHASE_PERFORMSORT_1);
     tuplesort_performsort(btspool->sortstate);
     if (btspool2)
 +   {
 +       if (progress)
 +           pgstat_progress_update_param(PROGRESS_CREATEIDX_SUBPHASE,
 +                                        PROGRESS_BTREE_PHASE_PERFORMSORT_2);
         tuplesort_performsort(btspool2->sortstate);
 +   }
  
     /*
      * Done.  Record ambuild statistics, and whether we encountered a broken