Re: Backup and Restore (pg_dump & pg_restore)

From: Ron <ronljohnsonjr(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Backup and Restore (pg_dump & pg_restore)
Date: 2019-04-21 21:20:03
Message-ID: 89f6196c-3680-8892-42ec-1c0b1fce0c8b@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-performance

On 4/21/19 3:58 PM, Adrian Klaver wrote:
> 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.

Errors need to be fixed.  If the restore can proceed without harm, then it's
an Informational message.

--
Angular momentum makes the world go 'round.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message legrand legrand 2019-04-21 21:51:44 Re: Display View Columns and Their Source Tables and Columns
Previous Message Adrian Klaver 2019-04-21 20:58:16 Re: Backup and Restore (pg_dump & pg_restore)

Browse pgsql-performance by date

  From Date Subject
Next Message Adrian Klaver 2019-04-21 22:13:23 Re: Backup and Restore (pg_dump & pg_restore)
Previous Message Adrian Klaver 2019-04-21 20:58:16 Re: Backup and Restore (pg_dump & pg_restore)