pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Pg_restore
Date: Fri, 1 Mar 2019 02:38:23 -0600
Message-ID: <87ef830f-58e8-487b-d548-7d041aca685d@gmail.com> (raw)
In-Reply-To: <CAMTZZh0fxVcWxSWSHG+s0Omniakcfm2ASiA7gnVK_5nLXoLLkA@mail.gmail.com>
References: <CAMTZZh0fxVcWxSWSHG+s0Omniakcfm2ASiA7gnVK_5nLXoLLkA@mail.gmail.com>

On 3/1/19 2:17 AM, Nicola Contu wrote:
> Hello,
> we are trying to move our postgres 10.5 instance to 11.2
>
> We are trying to restore a DB in a pre-production env but we get an error 
> on the pg_restore command
>
> [root@STAGING]#  /usr/local/pgsql11.2/bin/pg_restore -v -U postgres -L 
> /data/cofinder_restore.lst  -d cofinder  -j 16  /home/ncontu/data/dbbackups/C
> pg_restore: connecting to database for restore
> pg_restore: processing item 3098 ENCODING ENCODING
> pg_restore: processing item 3099 STDSTRINGS STDSTRINGS
> pg_restore: processing item 3100 SEARCHPATH SEARCHPATH
> pg_restore: processing item 3101 DATABASE cofinder
> pg_restore: processing item 3 SCHEMA public
> pg_restore: creating SCHEMA "public"
> 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;
>
> The dump is taken with pgsql10 binaries.
>
> Can you help on this please?
> We also have another DB, but with the other one no issues doing the same 
> thing.

Out of curiosity, why are you using the "-L" option instead of restoring the 
whole database?

-- 
Angular momentum makes the world go 'round.




view thread (67+ messages)  latest in thread

Message-ID: <87ef830f-58e8-487b-d548-7d041aca685d@gmail.com>
Permalink:  ../87ef830f-58e8-487b-d548-7d041aca685d@gmail.com/
Also on:    postgresql.org/message-id/87ef830f-58e8-487b-d548-7d041aca685d@gmail.com

 · 

reply

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: ronljohnsonjr@gmail.com
  Subject: Re: Pg_restore
  In-Reply-To: <87ef830f-58e8-487b-d548-7d041aca685d@gmail.com>
  References: <CAMTZZh0fxVcWxSWSHG+s0Omniakcfm2ASiA7gnVK_5nLXoLLkA@mail.gmail.com> <87ef830f-58e8-487b-d548-7d041aca685d@gmail.com>

* 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