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 1tKsqB-00BMAD-Qa for pgsql-general@arkaria.postgresql.org; Tue, 10 Dec 2024 05:31:24 +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 1tKsq9-00GEt0-9Y for pgsql-general@arkaria.postgresql.org; Tue, 10 Dec 2024 05:31:22 +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 1tKsq8-00GEsj-Bo for pgsql-general@lists.postgresql.org; Tue, 10 Dec 2024 05:31:22 +0000 Received: from fhigh-b7-smtp.messagingengine.com ([202.12.124.158]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tKsq6-0021Yf-IC for pgsql-general@postgresql.org; Tue, 10 Dec 2024 05:31:20 +0000 Received: from phl-compute-03.internal (phl-compute-03.phl.internal [10.202.2.43]) by mailfhigh.stl.internal (Postfix) with ESMTP id 1926A2540075; Tue, 10 Dec 2024 00:31:17 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-03.internal (MEProxy); Tue, 10 Dec 2024 00:31:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1733808676; x=1733895076; bh=3dq5FFX9dTGIZbzZPRdfo5IYBSOU3UVjF8XGRndvm4M=; b= ZWR8m4Z9LRRMzsv5WoTJTThe/PLiwWELIqj8dFVEGaPMH9mk+SPHIUkXVtB7P5oM AyUJ/cD5RnuUavn0d7oOUpCZv5dl7fxdECmNH7ijDDSPNNq5+g786c+mtBbPTBWc KQ5P+/lQZb9n+uWeaQBGqV4KCvsfvcvHIdkRSvlAa2ZCC5o2rLej6gOl0GshbHBW u6hPEmXVLHC2lV51tbmO+xusTgMA8Pilb6L9YLgknjDbUkknj69eUtMc1zQXpHCr LknIzHNrk2HPnCu1Kd3MxJ5NMPwWbGoZXqitwXUgKjZe1K0pfeIdpeAtqWz5WIZk NdEF8hkuXgK6jN3JRINPug== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1733808676; x=1733895076; bh=3 dq5FFX9dTGIZbzZPRdfo5IYBSOU3UVjF8XGRndvm4M=; b=snbNjjxZLB8IAA9j+ RzOauXdS2Wvh2HD0f9oBi6H3+JotztJCxMET/tEpLaZatMRVgaxbtWlBdjgTlQOm PRPUDja2H4ZpjCsHZ5gjluYRyYNlYEu2cp+2TaugfNg3pFP06jhxjJs/7Xnlnp4K VUw/BzFZfetRSFu9wroCBn36FvrgQXlH81sU5/9SgQYkaD06NoQfgejAGIU6XXJc vxG6yAsTWwpB1BeX1i77kLjTL4sjJ5FY8CPWFzRM4c8VJ0mUrSCH/VQ/kMXtgwGR pirQTyOtMH7HIUxAdgoM71y5pQNYJt8xWWO2/gpHQvUD5xJwKveVD+K+n37t9iai QRxFQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrjeejgdekgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecunecujfgurhepkfffgggfuf fvfhfhjggtgfesthekredttddvjeenucfhrhhomheptegurhhirghnucfmlhgrvhgvrhcu oegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhmqeenucggtffrrghtth gvrhhnpeelgeevkeekkeeuiefgtdevieeluefhfedufeetkeejffekjeeujeehgeehgeek tdenucffohhmrghinhepphhoshhtghhrvghsqhhlrdhorhhgnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhes rghklhgrvhgvrhdrtghomhdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouh htpdhrtghpthhtoheprhhonhhljhhohhhnshhonhhjrhesghhmrghilhdrtghomhdprhgt phhtthhopehpghhsqhhlqdhgvghnvghrrghlsehpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 10 Dec 2024 00:31:16 -0500 (EST) Message-ID: <49199b35-28a8-46e9-b874-8fce89fccfa6@aklaver.com> Date: Mon, 9 Dec 2024 21:31:15 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Errors when restoring backup created by pg_dumpall To: Ron Johnson , pgsql-general References: <6a6439f1-8039-44e2-8fb9-59028f7f2014@mailbox.org> <9c5ba566-27b8-4e8c-bf7d-2dc561509991@mailbox.org> Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 12/9/24 20:54, Ron Johnson wrote: > On Mon, Dec 9, 2024 at 11:24 PM David G. Johnston > > wrote: > > On Monday, December 9, 2024, Ron Johnson > wrote: > > On Sat, Nov 30, 2024 at 10:36 PM 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={custom,directory} backup? > > > pg_restore has a mode where it can dump out SQL to a script instead > of directly restoring to the database. > > > That Would Be Very, Very Bad if this were a database big enough to have > required a multi-threaded dump. From the original post: https://www.postgresql.org/message-id/6a6439f1-8039-44e2-8fb9-59028f7f2014%40mailbox.org "My HDD recently failed so I'm trying to restore my backup, but I'm running into some errors." There really was no choice. Not tested but in the pg_restore case I could see at least trying: 1) pg_restore -s -f schema_definitions.sql custom_format_file 2) Then making the change in the search_path in schema_definitions.sql and then load the schema in the database using psql 3) Then pg_restore -a -j custom_format_file. > > -- > Death to , and butter sauce. > Don't boil me, I'm still alive. > lobster! -- Adrian Klaver adrian.klaver@aklaver.com