Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1itXoR-0007xB-9v for pgsql-admin@arkaria.postgresql.org; Mon, 20 Jan 2020 14:13:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1itXoP-0006v2-IR for pgsql-admin@arkaria.postgresql.org; Mon, 20 Jan 2020 14:13:53 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1itXoP-0006uv-8d for pgsql-admin@lists.postgresql.org; Mon, 20 Jan 2020 14:13:53 +0000 Received: from c.likeit.fi ([91.90.49.182] helo=mail.likeit.fi) by magus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1itXoI-0007NN-CC for pgsql-admin@lists.postgresql.org; Mon, 20 Jan 2020 14:13:52 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.likeit.fi (Postfix) with ESMTP id EF17D117E62 for ; Mon, 20 Jan 2020 16:13:44 +0200 (EET) X-Virus-Scanned: Debian amavisd-new at likeit.fi Received: from mail.likeit.fi ([127.0.0.1]) by localhost (mail.likeit.fi [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3rg2it1qaVzf for ; Mon, 20 Jan 2020 16:13:44 +0200 (EET) Received: from hermes (217-119-39-222.cust.suomicom.net [217.119.39.222]) by mail.likeit.fi (Postfix) with ESMTPSA id 0E64E117E5F for ; Mon, 20 Jan 2020 16:13:44 +0200 (EET) Message-ID: Subject: Restore fails if using multiple threads and database is dumped through pipe From: Joni Ruuskanen To: pgsql-admin@lists.postgresql.org Date: Mon, 20 Jan 2020 16:13:43 +0200 Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5-1.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, After upgrading from Postgresql 11 to 12 I noticed pg_restore fails if -j / jobs parameter is specified and database is dumped through pipe. This doesn't happen if dump is saved through redirect (for example: > file.dmp) or file parameter (-f). Is this intended behaviour? Some examples: Dump to file: pg_dump -Fc -f dumptest-file.dmp dumptest Restore: pg_restore -j4 -d dumptest -O -Fc --role=tomcat dumptest-file.dmp No errors Dump to file via stdout: pg_dump -Fc dumptest > dumptest-stdout.dmp Restore: pg_restore -j4 -d dumptest -O -Fc --role=tomcat dumptest-stdout.dmp No errors Dump to file via pipe: pg_dump -Fc dumptest | tee dumptest-pipe.dmp >/dev/null Restore: pg_restore -j4 -d dumptest -O -Fc --role=tomcat dumptest-pipe.dmp pg_restore: error: could not find block ID 5648 in archive -- possibly due to out-of-order restore request, which cannot be handled due to lack of data offsets in archive pg_restore: error: a worker process died unexpectedly Piped dump is successfully restored if using only 1 thread/job. Regards, Joni Ruuskanen