Search Postgresql Archives

Re: pg_restore tells schema “test” already exists but it isn't actually

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/12/2015 06:53 PM, Alex Luya wrote:
When restoring a dump like this:

|pg_restore --clean --create --exit-on-error --dbname=test test.tar|

these error messages got printed out:

|pg_restore:[archiver (db)]Error whilePROCESSING TOC:pg_restore:[archiver
(db)]Error fromTOC entry 21;261580924SCHEMAtest test
pg_restore:[archiver (db)]could
notexecutequery:ERROR:schema"test"already existsCommand
was:CREATESCHEMAtest;|

but when:

|selectschema_name frominformation_schema.schemata;|

these got printed out

|schema_name --------------------pg_toast pg_temp_1 pg_toast_temp_1
pg_catalog publicinformation_schema|

What database are you running the above on?

What is the database you are trying to CREATE and does it already exist when you run the restore?

What happens if you try without --exit-on-error?


It seems like schema "test" doesn't exist yet,why do I got this kind of
error?






--
Adrian Klaver
adrian.klaver@xxxxxxxxxxx


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux