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 1tKrnQ-00BGIF-EX for pgsql-general@arkaria.postgresql.org; Tue, 10 Dec 2024 04:24:28 +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 1tKrnN-00FSS1-Le for pgsql-general@arkaria.postgresql.org; Tue, 10 Dec 2024 04:24:26 +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 1tKrnN-00FSRP-Ah for pgsql-general@lists.postgresql.org; Tue, 10 Dec 2024 04:24:26 +0000 Received: from mail-oo1-xc36.google.com ([2607:f8b0:4864:20::c36]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tKrnH-0020Re-SC for pgsql-general@postgresql.org; Tue, 10 Dec 2024 04:24:25 +0000 Received: by mail-oo1-xc36.google.com with SMTP id 006d021491bc7-5f2a9d25f7fso631515eaf.2 for ; Mon, 09 Dec 2024 20:24:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733804658; x=1734409458; 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=ufvvWsHt7MUhpsA0mKRRn0jic7DBijqVdRhfdest3LA=; b=Wol+fEiwmB/GAwrb1+r1nz00hlZ6Ln1pN09OVHK4VDblayGJThE6yQNZC5XKZHyw41 Vdsiy2XlJjzHOkMexD0tU2Tsud9TG5r0ZTSdVE0bAxOhVKqiP59ObdmzgFZURwRfn5NA hTq1LNQ1meI9vQfN5wJHPeYRHqX2z2DnjMWbvHI/LiRC+TRfsFx13eg4s59mtajrhM9p yL9iuEtbxcLlA+9LkXuHOu1t5TpExj0ea2K4WFmacPpYzh2nIby0/8bh/EfPXYkpDWCO Qht/hPaWRPg9pDojPX8XAMEoCj1QjouVebbvWv0uVeOrRZ9RVTR8x7Kgf8pJ7f2FjbCs q6KA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733804658; x=1734409458; 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=ufvvWsHt7MUhpsA0mKRRn0jic7DBijqVdRhfdest3LA=; b=FzNVO5IJhI3cEV0xwF1vkN/23gGzQUKfet+l+pJ8QhBODFBM0QSNP3X48Iyvu51Cl9 AwjyZBC7UfNamaY5Lri2TRsx4UnT4cchXlOcOlAimk2cRbUDZowvdL9Byah/XPi53kah 4BpkOWSLDhiHCh6ii9n1lFGCK2dRrEXGtKfCBtzqE12UV7nfS0vNaUeXKHpw5n6MUxw6 v3FnizKdgqv5gtU/aiuHyMIES7jwn8LBQ5zLAHKuHdseqSj++GQkVKHZS2YWmnYV4sQQ FLzjNV3FiFgOr8qH9QgoOZgLEoJV5Ha9lgiCg6l1DU9FMb92LJy8eRk8lsqp2Lr+IAMc wGxA== X-Gm-Message-State: AOJu0YweBPoaDJd4g+YosaLLZRAN93eouRxa14knbFBawBCvopRQZC2e vZVfAVKUdRZSYdlDRVPBionENBNItYQOJFlo9KZOOgfM/leeGo98i3wpK41lnc7sz15pVouWuYs lyzi94DpnaYkzfG34xL2QRvMapMY= X-Gm-Gg: ASbGncvnK13xZRvciy5uH+YqdPDPkhqS6LwP+qSXMZ1D8KQx9v9eopfkEp5Jg4nOGgj b9LcaIv89FkT7/kzdUsjx6sXqBkrtbk3+gVE= X-Google-Smtp-Source: AGHT+IGMa6xj62bm6W1EzRE9Fm0T2xj1DHmVQAl8IGoVB1/4gx1bep0VPACt/QXvV3UPh3nTLc/4XGTntwr4avV0UM4= X-Received: by 2002:a05:6820:1989:b0:5f2:a054:9e65 with SMTP id 006d021491bc7-5f2c9013da0mr1816723eaf.8.1733804657973; Mon, 09 Dec 2024 20:24:17 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a05:6802:3307:b0:577:9519:f64a with HTTP; Mon, 9 Dec 2024 20:24:17 -0800 (PST) In-Reply-To: References: <6a6439f1-8039-44e2-8fb9-59028f7f2014@mailbox.org> <9c5ba566-27b8-4e8c-bf7d-2dc561509991@mailbox.org> From: "David G. Johnston" Date: Mon, 9 Dec 2024 21:24:17 -0700 Message-ID: Subject: Re: Errors when restoring backup created by pg_dumpall To: Ron Johnson Cc: pgsql-general Content-Type: multipart/alternative; boundary="000000000000bf9f8d0628e2da17" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000bf9f8d0628e2da17 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Monday, December 9, 2024, Ron Johnson wrote: > On Sat, Nov 30, 2024 at 10:36=E2=80=AFPM Adrian Klaver > wrote: > [snip] > >> In future schema qualify all references. >> >> For now in the dump file you could search for >> >> SELECT pg_catalog.set_config('search_path', '', false); >> >> and set to >> >> SELECT pg_catalog.set_config('search_path', 'public', false); >> > > What if this had been a pg_dump --format=3D{custom,directory} backup? > pg_restore has a mode where it can dump out SQL to a script instead of directly restoring to the database. David J. --000000000000bf9f8d0628e2da17 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Monday, December 9, 2024, Ron Johnson <ronljohnsonjr@gmail.com> wrote:
On Sat, Nov 30, 2024 at 10:36= =E2=80=AFPM Adrian Klaver <adrian.klaver@aklaver.com> wrote:
[snip]=C2=A0
In future schema qualify all references.

For now in the dump file you could search for

SELECT pg_catalog.set_config('search_path', '', false)= ;

and set to

SELECT pg_catalog.set_config('search_path', 'public', = false);

What if thi= s had been a pg_dump --format=3D{custom,directory} backup?

pg_restore has a mode where it can dump out SQL= to a script instead of directly restoring to the database.

<= /div>
David J.

--000000000000bf9f8d0628e2da17--