Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1slflJ-000ViZ-F6 for pgsql-general@arkaria.postgresql.org; Wed, 04 Sep 2024 02:28:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1slflH-002m3S-TR for pgsql-general@arkaria.postgresql.org; Wed, 04 Sep 2024 02:28:48 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1slflH-002m3K-IV for pgsql-general@lists.postgresql.org; Wed, 04 Sep 2024 02:28:47 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1slflF-0002z7-NH for pgsql-general@lists.postgresql.org; Wed, 04 Sep 2024 02:28:47 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 4842Siok1543231; Tue, 3 Sep 2024 22:28:44 -0400 From: Tom Lane To: raf cc: pgsql-general@lists.postgresql.org Subject: Re: Help with "gpg -d ... | pg_restore ..." with unimportant pg_restore errors In-reply-to: References: Comments: In-reply-to raf message dated "Wed, 04 Sep 2024 12:23:45 +1000" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <1543229.1725416924.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 03 Sep 2024 22:28:44 -0400 Message-ID: <1543230.1725416924@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk raf writes: > On Tue, Sep 03, 2024 at 06:43:22PM -0700, "David G. Johnston" wrote: >> You specified =E2=80=9C-1=E2=80=9D so I don=E2=80=99t get why you belie= ve pg_restore should be >> continuing to execute in the face of the SQL error. > The reason I believe pg_restore should be continuing to execute in the f= ace of > the SQL error is because I didn't supply the -e option which is describe= d > thusly in the pg_restore manual entry: But you'd better also read the para about -1: -1 --single-transaction Execute the restore as a single transaction (that is, wrap the emitted commands in BEGIN/COMMIT). This ensures that either all the commands complete successfully, or no changes are applied. This option implies --exit-on-error. regards, tom lane