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 1slf3Q-000RwS-Jw for pgsql-general@arkaria.postgresql.org; Wed, 04 Sep 2024 01:43:29 +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 1slf3O-002OLN-Ug for pgsql-general@arkaria.postgresql.org; Wed, 04 Sep 2024 01:43:27 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1slf3O-002OFR-Is for pgsql-general@lists.postgresql.org; Wed, 04 Sep 2024 01:43:26 +0000 Received: from mail-oo1-xc2e.google.com ([2607:f8b0:4864:20::c2e]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1slf3M-0002IE-4V for pgsql-general@postgresql.org; Wed, 04 Sep 2024 01:43:25 +0000 Received: by mail-oo1-xc2e.google.com with SMTP id 006d021491bc7-5df9433ac0cso4072765eaf.3 for ; Tue, 03 Sep 2024 18:43:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725414203; x=1726019003; darn=postgresql.org; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=6EFJ3ryvTiRpL02vE5z/chg6jFFMkkNcbdXALU6fPnk=; b=ePdOi9z6fhSecXR0XCLmm3+uwlS40yPdMZxAXhISm9hwm585qC/LUI4g6I7twb8Tf6 8X7+K2OWJlZoIEOzZ5JyhUR3XFDpEze2mq63hxhqiKhy9hi3pY1kjo1eXsA2A8QWglS8 qwywYzUezrudVo8hq/9R4x49wSE8CpE8RtOle6+sQDJX1ygEkd0tuYTSTh2D96I8Hscq yliAQ54HF2h9p5CpII7x7pVsm4bxQzjTCBc9kEQP2iz6punrY1s1SnZkkmwr51eXjpFo Ah2CSsPfiHf0DvsNDc/iW7QFm9JKoFcrobNdcMkEX8wpuD/otksJPnqxJtXp8ctw4pXh awiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725414203; x=1726019003; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=6EFJ3ryvTiRpL02vE5z/chg6jFFMkkNcbdXALU6fPnk=; b=PQo2n09R17UKHMvRouQvQWdZNBqrtOemlXf8arwq2pO5rawbyoazgvSOlF/suTjfEp SnIZKP72J99AXgQIuPeGzhdUT0ZvfnHMR3VYSO/A9nzG+Owq0CFk2mKqTgKJm+j+ksLk xW9dIPXpi1Oy/PRo6/EEkGyhcht77Fj4334c+tWEFsYuxHFAaMPuHPIBSFRfqSF8iKq1 qnow4WyA5kZ12/n/iTBW/giL5CMK4dOEiTTeiDR3a/ES+nfgIqrIbVr5Q/NT65GqlgDm mFhUhgD97F7hn8mpnhY2Lb1DEEdN9/uWyX1Uzyyp/ZJVfOkHUEmrSQ6V2UgZrC9z0zKn nolQ== X-Gm-Message-State: AOJu0Yz9f5w4770zZSw0Jqqf+6vMnQPAjhc2B/taZ07PRUpw6OKSlJq5 6nEuBxsMR+2TqS41swOFhWQ/CqGMfZfARvx0o/As4wD/0IVNu1JskYblV/UaZBo0EEDLPVsRhTP gTednavrZA/4NXWwwWu7drTDntTSNr0+Q X-Google-Smtp-Source: AGHT+IHOAmgRb68rlUH8exORpUEu+rzGbtxoBH7+kGXzeQJOG0InKhE46zHF4q8q8c7MJ0ZwXTp6ZdEu/MBidScqyZI= X-Received: by 2002:a05:6870:a999:b0:267:df02:f7c0 with SMTP id 586e51a60fabf-2781a945645mr4618954fac.33.1725414203277; Tue, 03 Sep 2024 18:43:23 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ac9:7f51:0:b0:557:c384:fb61 with HTTP; Tue, 3 Sep 2024 18:43:22 -0700 (PDT) In-Reply-To: References: From: "David G. Johnston" Date: Tue, 3 Sep 2024 18:43:22 -0700 Message-ID: Subject: Re: Help with "gpg -d ... | pg_restore ..." with unimportant pg_restore errors To: raf Cc: "pgsql-general@postgresql.org" Content-Type: multipart/alternative; boundary="000000000000ad48630621414c29" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000ad48630621414c29 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tuesday, September 3, 2024, raf wrote: > Hi, > > I need help! > > I'm upgrading an ancient (but still awesome) postgresql-9.6.24 (via > EnterpriseDB) > to (a no doubt even more awesome) postgresql-15.8 (via debian (stable) > packages) > but am unable to load database backups that were encrypted via gpg. > Loading from > unencrypted backups works fine (and the millions of tests all pass! Yay!)= . > > I have a convenience program for handling loading called "load" > and the underlying commands that it executes look like this: > > dropdb -h payroll -p 5433 -U postgres payroll_tst > createdb -h payroll -p 5433 -U postgres -T template0 -E utf8 -O admin > payroll_tst Given the following command > gpg --decrypt 20240904-011254-payroll_tst.pgdump.gpg.aps24 | pg_restore > -1 -h payroll -p 5433 -U postgres -d payroll_tst -Fc And this error > > pg_restore: [archiver (db)] could not execute query: ERROR: could not > find function "xml_is_well_formed" in file "/usr/lib/postgresql/15/lib/ > pgxml.so" > Command was: CREATE FUNCTION public.xml_is_well_formed(text) > RETURNS boolean > LANGUAGE c IMMUTABLE STRICT > AS '$libdir/pgxml', 'xml... This should be expected. In particular=E2=80=A6 > gpg: error writing to '-': Broken pipe > gpg: error flushing '[stdout]': Broken pipe > gpg: handle plaintext failed: Broken pipe > pgrestore encountered errors > > I'm not worried about the xml_is_well_formed error (or the xml_valid erro= r > that > would happen next). I think those functions are ancient and irrelevant an= d > not > in use, and I'm happy for pg_restore to continue, like it does when gpg i= s > not > involved. You specified =E2=80=9C-1=E2=80=9D so I don=E2=80=99t get why you believe p= g_restore should be continuing to execute in the face of the SQL error. David J. --000000000000ad48630621414c29 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tuesday, September 3, 2024, raf <= postgres@raf.org> wrote:
Hi,

I need help!

I'm upgrading an ancient (but still awesome) postgresql-9.6.24 (via Ent= erpriseDB)
to (a no doubt even more awesome) postgresql-15.8 (via debian (stable) pack= ages)
but am unable to load database backups that were encrypted via gpg. Loading= from
unencrypted backups works fine (and the millions of tests all pass! Yay!).<= br>
I have a convenience program for handling loading called "load" and the underlying commands that it executes look like this:

=C2=A0 dropdb -h payroll -p 5433 -U postgres payroll_tst
=C2=A0 createdb -h payroll -p 5433 -U postgres -T template0 -E utf8 -O admi= n payroll_tst

Given the following command
=C2=A0
=C2=A0 gpg --decrypt 20240904-011254-payroll_tst.pgdump.gpg.aps24 | pg= _restore -1 -h payroll -p 5433 -U postgres -d payroll_tst -Fc
<= div>
And this error
=C2=A0

=C2=A0 pg_restore: [archiver (db)] could not execute query: ERROR:=C2= =A0 could not find function "xml_is_well_formed" in file "/u= sr/lib/postgresql/15/lib/pgxml.so"
=C2=A0 =C2=A0 =C2=A0 Command was: CREATE FUNCTION public.xml_is_well_formed= (text) RETURNS boolean
=C2=A0 =C2=A0 =C2=A0 LANGUAGE c IMMUTABLE STRICT
=C2=A0 =C2=A0 =C2=A0 AS '$libdir/pgxml', 'xml...

This should be expected.=C2=A0 In particular=E2=80=A6
=C2=A0
=C2=A0 gpg: error writing to '-': Broken pipe
=C2=A0 gpg: error flushing '[stdout]': Broken pipe
=C2=A0 gpg: handle plaintext failed: Broken pipe
=C2=A0 pgrestore encountered errors

I'm not worried about the xml_is_well_formed error (or the xml_valid er= ror that
would happen next). I think those functions are ancient and irrelevant and = not
in use, and I'm happy for pg_restore to continue, like it does when gpg= is not
involved.

You specified =E2=80=9C-1=E2=80= =9D so I don=E2=80=99t get why you believe pg_restore should be continuing = to execute in the face of the SQL error.

David J.<= /div>

--000000000000ad48630621414c29--