Re: pg_restore tells schema “test” already exists but it isn't actually - Mailing list pgsql-general

From Adrian Klaver
Subject Re: pg_restore tells schema “test” already exists but it isn't actually
Date
Msg-id 564570D9.8080009@aklaver.com
Whole thread Raw
In response to pg_restore tells schema “test” already exists but it isn't actually  (Alex Luya <alexander.luya@gmail.com>)
List pgsql-general
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@aklaver.com


pgsql-general by date:

Previous
From: Thomas Munro
Date:
Subject: Re: Issues with german locale on CentOS 5,6,7
Next
From: Alex Luya
Date:
Subject: