Prometheus
Prometheus

Reputation: 1251

pg_restore WARNING: errors ignored on restore: 62

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

  1. First, i created a database in pgadmin with same name as the given file.

  2. 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 .

Upvotes: 2

Views: 25447

Answers (2)

Pawan Kumar Singh
Pawan Kumar Singh

Reputation: 27

{solved} please check the version of the Postgresql pgAdmin4 and the version of ".Sql" file you want to import into your database ,and instead of restoring at public you should directly restore at the database itself.

2:- drop the database and again re-create the fresh database(name='xyz') & at the same database ('xyz'** ->RightClick->Restore->Filename->'select(formate ".sql")->Restore**) than->refresh the database. and by doing that it'll create i new Schema just above public Schema..

Upvotes: -2

jjanes
jjanes

Reputation: 44343

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.

Upvotes: 3

Related Questions