I wrote:
> One of the things I do not like about the current coding of parallel
> pg_dump/pg_restore is its baroque logic for handling worker completion
> reports, specifically the ListenToWorkers/ReapWorkerStatus APIs.
Here's a version of this patch rebased over e652273e073566b6.
Since this is only refactoring, and doesn't (I think) fix any bugs,
I'm setting it aside till the next commitfest.
regards, tom lane