After all consumer processes have finished sorting the data for each partitioned range:
For create index commands, the coordinating process merges the subindexes into one final index.
For merge joins, the worker processes for the merge step perform the merge with the other tables in the merge join.
For other queries, the coordinating process merges the sort results and returns them to the client.