From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Nick Renders <postgres@arcict.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: PostgreSQL 14: pg_dump / pg_restore error: could not write to the communication channel: Broken pipe
Date: Fri, 15 Oct 2021 10:13:28 -0300
Message-ID: <202110151313.dk4fatdj4qii@alvherre.pgsql> (raw)
In-Reply-To: <07E90B0D-C41F-4B37-9DAB-469BB708CE37@arcict.com>
On 2021-Oct-15, Nick Renders wrote:
> Hello,
>
> I have been trying to import a Postgres 11 database into Postgres 14, but
> the pg_restore command exits with the following message:
>
> pg_restore: error: could not write to the communication channel: Broken
> pipe
>
> The command I sent looks like this:
>
> /Library/PostgreSQL/14/bin/pg_restore -h localhost -p 48100 -U postgres -w
> -C -d template1 -j 24 -Fd /Volumes/Migration/dbname --verbose
>
> It seems that the multiple jobs parameter is the cause. If I specify "-j 1",
> the command works without problems. If I specify "-j 2" or higher, I get the
> above error after a few seconds.
Hi,
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. I don't know anything about
macOS so I can't help you with that. I can tell you however that this
error has not been reported previously.
--
Álvaro Herrera 39°49'30"S 73°17'W — https://www.EnterpriseDB.com/
"I dream about dreams about dreams", sang the nightingale
under the pale moon (Sandman)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: alvherre@alvh.no-ip.org, postgres@arcict.com
Subject: Re: PostgreSQL 14: pg_dump / pg_restore error: could not write to the communication channel: Broken pipe
In-Reply-To: <202110151313.dk4fatdj4qii@alvherre.pgsql>
References: <07E90B0D-C41F-4B37-9DAB-469BB708CE37@arcict.com> <202110151313.dk4fatdj4qii@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox