pg_restore WARNING: errors ignored on restore: 62
It looks like the dump you were given is not a complete backup. It only has the data, not the object definitions. That is, it was created by pg_dump using -a
, --data-only
, or --section=data
.
Unless you already know what the object definitions are from some other source (e.g., an existing database server with the same schema definitions, or a dump file generated with pg_dump -s
), you will have a hard time loading this data.
Comments
-
Prometheus over 1 year
I was given a database file , i don't know the userid who dumped it or it's privileges .
I use postgresql 9.6.7-1 with pg_admin4(v3.0) , OS: windows 10
First, i created a database in pgadmin with same name as the given file.
I used the
restore
option to restore the file but after some seconds
i got type of messages like :
pg_restore: executing SEQUENCE SET xxxx pg_restore: [archiver (db)] Error from TOC entry 4309; 0 0 SEQUENCE SET xxxx postgres pg_restore: [archiver (db)] could not execute query: ERROR: relation "public.xxxx" does not exist LINE 1: SELECT pg_catalog.setval('public.xxxx', 1, false); ^ Command was: SELECT pg_catalog.setval('public.xxxx', 1, false);
and below all, the warning :
"WARNING: errors ignored on restore: 62"
comparing with other's answers i dont even get a single bit of data restored.
I have tried also with
pg_restore
command but i get the same result .
-
jjanes over 5 yearsWhat are the 62 errors that were ignored?
-
Prometheus over 5 yearsi added the type of errors as an edit to my question
-
wildplasser over 5 yearsMaybe 'xxxx' exists, but in a different schema ? In the script, find out how/if xxxx is created.
-
Prometheus over 5 yearsAs i see the first half of these warnings have similar output but with the command "COPY" public.xxxx (column1,column2,...) FROM stdin; instead of "SELECT". Nothing about "create" so far . When u mean in a different schema , u mean different database ? .
-
wildplasser over 5 yearsNo,when I say
schema
, I mean schema. And: theselect setval('xxxx', 1234);
is normally added at the end of the load-script to set the sequence values to the max occurring number in the corresponding table-column. -
Prometheus over 5 yearsIn conclusion , the warning issue is due to another file that has already created the corresponding tables ?
-
Prometheus over 5 yearsYou were actually right , i request about the definitions and i was given the same file with the necessary sql scripts and worked fine after the restore .