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 1tK0RK-006Ijr-TD for pgsql-general@arkaria.postgresql.org; Sat, 07 Dec 2024 19:26:06 +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 1tK0RG-00GZtr-Va for pgsql-general@arkaria.postgresql.org; Sat, 07 Dec 2024 19:26:04 +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 1tK0RF-00GZtj-Qq for pgsql-general@lists.postgresql.org; Sat, 07 Dec 2024 19:26:03 +0000 Received: from mout-p-201.mailbox.org ([2001:67c:2050:0:465::201]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tK0R8-001YQn-AS for pgsql-general@postgresql.org; Sat, 07 Dec 2024 19:26:01 +0000 Received: from smtp202.mailbox.org (smtp202.mailbox.org [10.196.197.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4Y5J4s3VcXz9sRn; Sat, 7 Dec 2024 20:25:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1733599549; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2MBASJfyEVhPJmk+f2Q1YYyhw7eZqWN0t/tiguvDA0c=; b=eMJ4j4ZSQ2KbnAAD0tRZelafpOIJd0QFktw7TwmBzMTlKuVgVaqF/zv7SicslCOXKYbBec YFlXBjUCr1c2ZvRHucX2t9mWcpnpplDpRYJDW15tZWOAICHAGt2xW+2ecThhO+Py2quUtl z5p4xJhp58q88ZcMi5mSl7De5IxiAooY+ExZ7J8ZMUleR54W2uh2pVNdn2B6EbajMraKnp h4JQi4/EGy7Q1tZc0/rNT8ijitz4gRnZ5YODCq3qgemQaOIpZy46AfD1PACVWWmwDtFGgn TsG1DUzHUdzkER25GYvM6YryqEAiztqAnt61hZe8jU2MRK0GTJVOxniuLpkUcQ== Message-ID: Date: Sat, 7 Dec 2024 11:25:29 -0800 MIME-Version: 1.0 Subject: Re: Errors when restoring backup created by pg_dumpall To: Adrian Klaver , Tom Lane Cc: "David G. Johnston" , "pgsql-general@postgresql.org" References: <6a6439f1-8039-44e2-8fb9-59028f7f2014@mailbox.org> <9c5ba566-27b8-4e8c-bf7d-2dc561509991@mailbox.org> <41791b6d-aaf5-4fed-9cc3-e89bc49e8637@mailbox.org> <1257068.1733025493@sss.pgh.pa.us> <06425038-e012-4bac-aec1-d9541436f893@mailbox.org> <92405f98-7f0c-4442-8252-697352daefc1@aklaver.com> <1470486.1733087658@sss.pgh.pa.us> <4ab662d8-57cc-471f-8a58-cfd71d1cea22@aklaver.com> <1475512.1733090108@sss.pgh.pa.us> <19d5f2c7-1252-4442-accb-8aa2cb289ad0@mailbox.org> Content-Language: en-US From: PopeRigby In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-MBO-RS-META: kg33wsyjetzbaiciadpdot5c5rqeywpn X-MBO-RS-ID: 9e4e28608418378efd4 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 12/5/24 14:48, Adrian Klaver wrote: > On 12/5/24 14:32, PopeRigby wrote: >> On 12/1/24 13:55, Tom Lane wrote: >>> Adrian Klaver writes: >>>> On 12/1/24 13:14, Tom Lane wrote: >>>>> It would be useful to know what is the command at line 4102 >>>>> of all.sql. >>>> It is here: >>>> https://gist.github.com/poperigby/fcb59eb6c22c6051800e06a0ec482b49 >>>> CREATE TABLE public.geodata_places ( >>>>       id integer NOT NULL, >>>>       name character varying(200) NOT NULL, >>>>       longitude double precision NOT NULL, >>>>       latitude double precision NOT NULL, >>>>       "countryCode" character(2) NOT NULL, >>>>       "admin1Code" character varying(20), >>>>       "admin2Code" character varying(80), >>>>       "modificationDate" date NOT NULL, >>>>       "earthCoord" public.earth GENERATED ALWAYS AS >>>> (public.ll_to_earth(latitude, longitude)) STORED, >>>>       "admin1Name" character varying, >>>>       "admin2Name" character varying, >>>>       "alternateNames" character varying >>>> ); >>> Ah!  Then the failure occurs because we do a planning pass on the >>> GENERATED expression (I don't remember exactly why that's needed >>> during CREATE TABLE).  So maybe messing with the dump script's >>> search_path setting *would* be enough to get you past that. >>> >>> Having said that, the CREATE should have been seeing the new-style >>> definition of ll_to_earth() if the 1.2 version of earthdistance >>> was correctly installed. >>> >>>             regards, tom lane >> >> So, is there anything I can do to fix this particular backup? I'm >> kind of stuck here. There's also the issue with it for some reason >> failing to connect to the lldap database after it literally just >> created it. Some weird things going on. >> > > In the pg_dumpall sql script did you change: > > SELECT pg_catalog.set_config('search_path', '', false); > > to > > SELECT pg_catalog.set_config('search_path', 'public', false); > > ? > > > Show us the connection error you got for the lldap database. > It actually looks like setting those all to have public fixed all the errors, including the one with lldap. So, how can I get it to not put public there automatically for next time?