gpexpand: cleanup new segments in parallel
When cleaning up the master-only files on the new segments we used to do
the job one by one, when there are tens or hundreds of segments it can
be very slow.
Now we cleanup in parallel.
@@ -1417,6 +1417,7 @@ class gpexpand:
, sqlCommandList=statements
)
self.pool.addCommand(execSQLCmd)
+
self.pool.join()
### need to fix self.pool.check_results(). Call getCompletedItems to clear the queue for now.
self.pool.check_results()
