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 1hIJXe-0004Ke-5X for pgsql-general@arkaria.postgresql.org; Sun, 21 Apr 2019 20:58:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hIJXc-0007qV-Ml for pgsql-general@arkaria.postgresql.org; Sun, 21 Apr 2019 20:58:24 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hIJXa-0007qN-El for pgsql-general@lists.postgresql.org; Sun, 21 Apr 2019 20:58:24 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hIJXX-0002Ii-84 for pgsql-general@lists.postgresql.org; Sun, 21 Apr 2019 20:58:21 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 1C59721B5A for ; Sun, 21 Apr 2019 16:58:18 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sun, 21 Apr 2019 16:58:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm2; bh=3 SAZtB545oDpG3mrXIkqHMGe6Tg5fIF7JBbJJSPxd5s=; b=LfpHPW/8y5C1/zO8d GHuKbsrEIL77ZtWb/rNqhbcSpvkAUWCJGXgs55j8D24pJrOVqiUF+CdQ72kkdusx Zh+AuoWgNswC4x55yQ4ZSfEtGqzxDlUUUtxuCvWC+O7xmxkxG32hbRV7NDbXk+eN uDGPcKv/FSXDp80p9SYs9AEAIMNhty640wmuLBmrIDDCBv2Mh8c9ugumQyMh8v84 AFlgYVlJW76A++Eg8BX5V2ttgEPE0CwfctyIdBTXnFV4wzdNToU55pcdJSC/rIDx NnOW8wWGVmgXXwC2YjIHBssgfYvha6onknrFAzUMUwxczq+H/52VAq4vfO7RTtOm 9QASw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=3SAZtB545oDpG3mrXIkqHMGe6Tg5fIF7JBbJJSPxd 5s=; b=VbGp37Eg/6E09PvJm1ApEOBfCGAMzxbHC0N6aYHtpBomTP7AacQ3Yh5VB Ov9LmWyPaTevpEfeK6mk1WJEEdROCROe5JAxpEX2h5l2NpkvxDGH27KZ2KTOYN4m 9ZvAlYJyR9M4cfpBi2N39lPaocGohFVxyST/J0O5lrVtoAAEoyqMkQXR3TjnrK+Q tTw9tjNcfutEtUh6MGNFRJBKon11IK7h7CpikFJg0BCvdx8q0bE+t5zncXjSGMT9 d06w9wPFl+uCIPQ9f9rVfvdkx/YJivD+Xdkp8aqgSzaLeng4jJ7Cs2vFpcIrOmKi 3dqxvqM46qsDNY8Z7VGe1S4O48DdA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrgeeggddufeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvfhfhffkffgfgggjtgfgsehtje ertddtfeejnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhk lhgrvhgvrhesrghklhgrvhgvrhdrtghomheqnecukfhppeejuddrvdduvddrudehtddrvd dtvdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghk lhgrvhgvrhdrtghomhenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from [192.168.1.4] (unknown [71.212.150.202]) by mail.messagingengine.com (Postfix) with ESMTPA id 75CC9E432B for ; Sun, 21 Apr 2019 16:58:17 -0400 (EDT) Subject: Re: Backup and Restore (pg_dump & pg_restore) To: pgsql-general@lists.postgresql.org References: <3eab0829-f48e-5eb6-3cbd-b64d93e3dc7b@gmail.com> From: Adrian Klaver Message-ID: <286599d3-429e-a9b9-bf9d-a92e6dbcb403@aklaver.com> Date: Sun, 21 Apr 2019 13:58:16 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <3eab0829-f48e-5eb6-3cbd-b64d93e3dc7b@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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