Re: Backup and Restore (pg_dump & pg_restore) - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Backup and Restore (pg_dump & pg_restore)
Date
Msg-id 286599d3-429e-a9b9-bf9d-a92e6dbcb403@aklaver.com
Whole thread Raw
In response to Re: Backup and Restore (pg_dump & pg_restore)  (Ron <ronljohnsonjr@gmail.com>)
Responses Re: Backup and Restore (pg_dump & pg_restore)  (Ron <ronljohnsonjr@gmail.com>)
List pgsql-general
On 4/21/19 1:42 PM, Ron wrote:
> On 4/21/19 1:46 PM, Adrian Klaver wrote:
>> On 4/21/19 9:35 AM, Daulat Ram wrote:
>>> Hello Team,
>>>
>>> We are getting below error while migrating pg_dump from Postgresql 
>>> 9.6 to Postgresql 11.2 via pg_restore in docker environment.
>>>
>>> 90d4c9f363c8:~$ pg_restore -d kbcn "/var/lib/kbcn_backup19"
>>>
>>> pg_restore: [archiver (db)] Error while PROCESSING TOC:
>>>
>>> pg_restore: [archiver (db)] Error from TOC entry 3; 2615 2200 SCHEMA 
>>> public postgres
>>>
>>> pg_restore: [archiver (db)] could not execute query: ERROR: schema 
>>> "public" already exists
>>>
>>> Command was: CREATE SCHEMA public;
>>
>> Expected as the public schema is there by default. It is an 
>> informational error, you can ignore it.
> 
> "Informational error" is a contradiction in terms.
> 


1) Well the public schema was in the dump, so the OP wanted it.
2) It also existed in the target database.
3) The error let you know 1) & 2)
4) To my way of thinking it was a 'no harm, no foul' situation where the 
error just informed you that the target database took a side track to 
get where you wanted to be anyway.

I see this sort of thing in monitoring systems e.g. environmental 
controls all the time. Things get flagged because they wander over set 
points intermittently. It is technically an error but unless they stay 
over the line it is just another data point.

-- 
Adrian Klaver
adrian.klaver@aklaver.com



pgsql-general by date:

Previous
From: Ron
Date:
Subject: Re: Backup and Restore (pg_dump & pg_restore)
Next
From: Ron
Date:
Subject: Re: Backup and Restore (pg_dump & pg_restore)