In Windows pg_dump, ensure idle workers will shut down during error exit.
authorTom Lane
Thu, 26 May 2016 14:50:30 +0000 (10:50 -0400)
committerTom Lane
Thu, 26 May 2016 14:50:42 +0000 (10:50 -0400)
commitd32bc204c733276810a400db41f64f32c489733f
tree59ebdb4ca42ad52c4d0c06e23602d1bea4cb3142
parent7a0f09da7dc3378130547c81e47b9c96bcfd0634
In Windows pg_dump, ensure idle workers will shut down during error exit.

The Windows coding of ShutdownWorkersHard() thought that setting termEvent
was sufficient to make workers exit after an error.  But that only helps
if a worker is busy and passes through checkAborting().  An idle worker
will just sit, resulting in pg_dump failing to exit until the user gives up
and hits control-C.  We should close the write end of the command pipe
so that idle workers will see socket EOF and exit, as the Unix coding was
already doing.

Back-patch to 9.3 where parallel pg_dump was introduced.

Kyotaro Horiguchi
src/bin/pg_dump/parallel.c