Thank you for all the feedback and suggestions.
It seems that the "-h localhost" parameter is triggering the issue. If I
leave it out, pg_restore works without problems with multiple jobs. I
have also tried specifying the IP number instead of "localhost", but
that results in the same error.
I see now that our original pg_restore script does not include the -h
parameter. Somehow, it has snuck in my commands when testing Postgres
14. That might mean that the same issue exists in previous versions as
well. I will investigate further.
Nick
On 15 Oct 2021, at 19:08, Tom Lane wrote:
> Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
>> Yeah, pg_dump in parallel mode uses a pipe to communicate between
>> leader
>> and workers; the error you see is what happens when a write to the
>> pipe
>> fails. It sounds to me like something in the operating system is
>> preventing the pipes from working properly.
>
> BTW, I think a more likely explanation is "one of the pg_dump or
> pg_restore worker processes crashed". Why that should be is still
> a mystery though.
>
> regards, tom lane