Make error handling in parallel pg_upgrade less bogus.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 35efdd7fb81de8333949e7d7ea55908cc91ba897
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2018-12-16T19:51:48Z
Releases: 9.5.16
Make error handling in parallel pg_upgrade less bogus.

reap_child() basically ignored the possibility of either an error in
waitpid() itself or a child process failure on signal.  We don't really
need to do more than report and crash hard, but proceeding as though
nothing is wrong is definitely Not Acceptable.  The error report for
nonzero child exit status was pretty off-point, as well.

Noted while fooling around with child-process failure detection
logic elsewhere.  It's been like this a long time, so back-patch to
all supported branches.

Files

PathChange+/−
src/bin/pg_upgrade/parallel.c modified +8 −9