Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pXi7H-0005Qh-0B for pgsql-admin@arkaria.postgresql.org; Thu, 02 Mar 2023 12:32:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pXi7F-000339-Tx for pgsql-admin@arkaria.postgresql.org; Thu, 02 Mar 2023 12:32:57 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pXi7F-000330-Jc for pgsql-admin@lists.postgresql.org; Thu, 02 Mar 2023 12:32:57 +0000 Received: from mout-u-204.mailbox.org ([80.241.59.204]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pXi7D-000686-I3 for pgsql-admin@lists.postgresql.org; Thu, 02 Mar 2023 12:32:57 +0000 Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:b231:465::202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-204.mailbox.org (Postfix) with ESMTPS id 4PS9VX33JGz9sWw; Thu, 2 Mar 2023 13:32:52 +0100 (CET) Date: Thu, 2 Mar 2023 13:32:51 +0100 (CET) From: Erik Wienhold To: Holger Jakobs , "pgsql-admin@lists.postgresql.org" Message-ID: <453307953.83682.1677760371729@office.mailbox.org> In-Reply-To: <572addf0-5116-cec0-77fb-9a0ba0161240@jakobs.com> References: <572addf0-5116-cec0-77fb-9a0ba0161240@jakobs.com> Subject: Re: psql terminates on first error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Normal X-Rspamd-Queue-Id: 4PS9VX33JGz9sWw List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On 02/03/2023 12:53 CET Holger Jakobs wrote: > > While trying to transfer data from one instance to another using > pg_dumpall and psql, the psql stopped on first error, causing pg_dumpall > to terminate as well. > > This behaviour was seen on Windows (EDB installer), but is different on > Linux. Database on Windows and client on Linux? What's the error and is it the same on Linux? Is there even an error on Linux? > Only when using an option -c "\set ON_ERROR_STOP false" (plus -f - of > course to continue reading) psql continued after first error. Do you use PowerShell and pipe pg_dumpall into psql? The first thing that comes to my mind when reading Postgres+Windows is that PowerShell up to version 5.1 converts stdout to UTF-16LE. This already tripped me up in past with pg_dump and psql. -- Erik