From: Tom Lane <tgl@sss.pgh.pa.us>
To: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: Daulat Ram <Daulat.Ram@exponential.com>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Backup and Restore (pg_dump & pg_restore)
Date: Sun, 21 Apr 2019 15:25:51 -0400
Message-ID: <16449.1555874751@sss.pgh.pa.us> (raw)
In-Reply-To: <d5e85379-8055-5604-d236-60fced2a7ee4@aklaver.com>
References: <BL0PR01MB518710A35F4FF2A127563A2A9B200@BL0PR01MB5187.prod.exchangelabs.com>
<BL0PR01MB51872B41EDB099721B5606E59B210@BL0PR01MB5187.prod.exchangelabs.com>
<d5e85379-8055-5604-d236-60fced2a7ee4@aklaver.com>
Adrian Klaver <adrian.klaver@aklaver.com> writes:
> On 4/21/19 9:35 AM, Daulat Ram wrote:
>> 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.
It's expected only if you made a dump file with 9.6's pg_dump and
restored it with a later pg_restore; there were some changes in
how the public schema got handled between the two versions.
The usual recommendation when you are doing a version migration
is to use the newer release's pg_dump to suck the data out of
the older server. If you can't do that, it'll (probably)
still work, but you may have cosmetic issues like this one.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, adrian.klaver@aklaver.com, Daulat.Ram@exponential.com
Subject: Re: Backup and Restore (pg_dump & pg_restore)
In-Reply-To: <16449.1555874751@sss.pgh.pa.us>
References: <BL0PR01MB518710A35F4FF2A127563A2A9B200@BL0PR01MB5187.prod.exchangelabs.com> <BL0PR01MB51872B41EDB099721B5606E59B210@BL0PR01MB5187.prod.exchangelabs.com> <d5e85379-8055-5604-d236-60fced2a7ee4@aklaver.com> <16449.1555874751@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox