From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | PopeRigby <poperigby(at)mailbox(dot)org>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Errors when restoring backup created by pg_dumpall |
Date: | 2024-11-30 01:47:55 |
Message-ID: | cba48d2c-0987-4233-a86f-2e693677efd3@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 11/29/24 17:34, PopeRigby wrote:
> My HDD recently failed so I'm trying to restore my backup, but I'm
> running into some errors.
>
> I've been using a systemd service that periodically backs up my cluster
> with pg_dumpall, and I'm using this command to restore:
>
> sudo psql -f backup.sql postgres
>
> I'm getting this output:
> https://gist.github.com/poperigby/d5a0103b9de1eba95aba783007e557ea
psql:all.sql:4104: ERROR: type "earth" does not exist
LINE 1: ...ians($1))*sin(radians($2))),earth()*sin(radians($1)))::earth
QUERY: SELECT
cube(cube(cube(earth()*cos(radians($1))*cos(radians($2))),earth()*cos(radians($1))*sin(radians($2))),earth()*sin(radians($1)))::earth
CONTEXT: SQL function "ll_to_earth" during inlining
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
);
Looks like an extension or extensions where not installed before the
restore was done.
>
> This is my (redacted) database dump:
> https://gist.github.com/poperigby/fcb59eb6c22c6051800e06a0ec482b49
>
>
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2024-11-30 07:41:02 | Re: PostgreSQL 15.10 update corrective action for ATTACH PARTITION/DETACH PARTITION |
Previous Message | Ron Johnson | 2024-11-30 01:44:46 | Re: Errors when restoring backup created by pg_dumpall |