Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gzdge-0002l7-R6 for pgsql-general@arkaria.postgresql.org; Fri, 01 Mar 2019 08:38:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gzdgd-0004Qv-Go for pgsql-general@arkaria.postgresql.org; Fri, 01 Mar 2019 08:38:31 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gzdgd-0004Qo-6J for pgsql-general@lists.postgresql.org; Fri, 01 Mar 2019 08:38:31 +0000 Received: from mail-ot1-x344.google.com ([2607:f8b0:4864:20::344]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gzdga-0005y5-Qb for pgsql-general@lists.postgresql.org; Fri, 01 Mar 2019 08:38:30 +0000 Received: by mail-ot1-x344.google.com with SMTP id c18so20244382otl.13 for ; Fri, 01 Mar 2019 00:38:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=v2znWwUkSsmnAtZGtLVkp2H0sw68ucdSWu4TEefPvqo=; b=FMdBUf7HWdE1BUr5yS/fMhFxc49VGmx6VWCrAKf40uAfEtypaf0D6VCftzj6G1xrEU dWeaRDzNBo4zWFRRGw4HnalAc3qxvIRCaVcrZ/Ql6UQL8j6k3zJ7rQEw2p18/TilsOIe Jk05gEsqLkRASWNE1sR5AezRgK785GTzdP2BqTj9tajwwZMNpJyluOSGCigVIJjTfwk+ X0JBhKZWceT7eJx34f8oNfTsgtzH973l6ixFc0ZDuvZTfBdhEhdI+Rx/8ioiMU43Z0EV FfgfKp10l9Gk6rM8Ebrn9zEglMgGM/acn20p6xfBa2vmyf84KXjk5UM6K5OqsNmyyedt GRew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=v2znWwUkSsmnAtZGtLVkp2H0sw68ucdSWu4TEefPvqo=; b=HLR3BM94wewcO7FvN0vVODMdMj8mfnwXUfhyLAwKVqanJs1Lk85ZoZh6kosOEk4VDJ 05ALOsSIh4XlRGrK6a/SbizlQTc14faa4pezLy4cXRMJQXI7RswYk206R8ycURuBgsMj HvUJC080psl8srPSh8nPWTjuwbE9u5Bs8Ztp/JlO6Qiy6KmS8D2GqQgVcAKu48Frg7oX GHd4sm2zvfW3f0WlvFRRyrOQYrlw8RXpu/UovcNM7/ZMbfLStx9jqJTKi4KNdHyBCy88 azGcOw54TJ2gpcch5wCQ5hbnZOYNw0WOqSDfVmRMMW+pCZOt9xLFCsyL3mI7zUPX07Bw 24bw== X-Gm-Message-State: APjAAAV8bYbziNQFzUpum3hAriAjug+2rCT4Ukz1pp/fEfwqpM4iLpF+ pQCGIgJ9yFt3nYJil60MPzZAVRnM X-Google-Smtp-Source: APXvYqzkkzMqnhyybcodvcqzlpiXMHlqfLymZ3pDvpApegz6+za7RJ4LoPBAJtJEOiaTklg5wPwyIQ== X-Received: by 2002:a9d:3f7:: with SMTP id f110mr2862267otf.174.1551429505207; Fri, 01 Mar 2019 00:38:25 -0800 (PST) Received: from [192.168.1.10] (ip70-171-116-89.no.no.cox.net. [70.171.116.89]) by smtp.googlemail.com with ESMTPSA id k11sm4867623oia.16.2019.03.01.00.38.24 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Mar 2019 00:38:24 -0800 (PST) Subject: Re: Pg_restore To: pgsql-general@lists.postgresql.org References: From: Ron Message-ID: <87ef830f-58e8-487b-d548-7d041aca685d@gmail.com> Date: Fri, 1 Mar 2019 02:38:23 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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.