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 1i61Am-0000tJ-8v for pgsql-general@arkaria.postgresql.org; Thu, 05 Sep 2019 23:28:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i61Al-0005Um-3c for pgsql-general@arkaria.postgresql.org; Thu, 05 Sep 2019 23:28:15 +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 1i61Ak-0005Lr-Ke for pgsql-general@lists.postgresql.org; Thu, 05 Sep 2019 23:28:14 +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.92) (envelope-from ) id 1i61Ai-0004V9-EQ for pgsql-general@postgresql.org; Thu, 05 Sep 2019 23:28:13 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id AFAB12151C; Thu, 5 Sep 2019 19:28:11 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Thu, 05 Sep 2019 19:28:11 -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=fm3; bh=T tXXMBmQcZc86iXc0Z8qTajzFjGwTRIEF9MAj7Nqz0A=; b=OL+3Oc84fg1poRxm6 mm38sveBV2m3DwiYOU/WZ4atwyYT6oYikkIPU0LH38Z1P8jux8YFlhVc4DsvenBH GfnS3uvT6CVlxdSDusveTFvpEge+b5KcPUjbCvL3OlK/cGNy4bzMu7iObL9F0MkV JXOUh9tP1Oqh0OR8RcssxzGvUhqGUeCZzrI1B8KL2AY8SvY4GDIaIuN5xQU60OuA U2do41M5XhYrWJU7xEJCiF88uG2EwP3IFmv0coyxUiu3w3Cpcgxw/tnd6Q6GHQxk BkzsxgX0HgYyE+j6jxmSqPW1x8dB3XK0x2D2edJNkTAe5rhe0BJPCxN+GQgCrK6Q wtimw== 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=fm3; bh=TtXXMBmQcZc86iXc0Z8qTajzFjGwTRIEF9MAj7Nqz 0A=; b=AR4pR9Jg6wZrZPeidvBNkGk/hszBv8HvUUqQps7iv3FWIsjbZe2QMX4kc Kgm0UgwUOagGLMHqodJNXiyvjUwJpxUC+b8vOo+5rLnxq9Cd/ZvM9g1Rcfa+PYdj iW3U+HiRbsFzcdmFUKJe1lhOo0iSTbCG/3iMu0Qjr03zNOfJ8O5/uHWcDYtTFI+a H35nEEH2gfFxJhJ1XbLbSOgd3gsvxbq3O5N0/YDVM7imPaExkgMjtUsgnBtwGPDf wbvLmy6Nf+yrUulcRSQHFnlAGD+PshVgzDXDizsYd+ue/HWH0zusvXklBhlIm2Cx KugBhe8tbvfOAuwmEOtD5FMhDEgUw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrudejkedgudefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtgfesthekredttdefjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucfkphepjedurddvuddvrdduhedtrddvtddvnecurfgrrhgrmhepmhgrihhlfhhr ohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhmnecuvehluhhsth gvrhfuihiivgeptd X-ME-Proxy: Received: from [192.168.1.4] (unknown [71.212.150.202]) by mail.messagingengine.com (Postfix) with ESMTPA id D87968005C; Thu, 5 Sep 2019 19:28:10 -0400 (EDT) Subject: Re: pg_restore issues with intarray To: Kevin Brannen , "pgsql-general@postgresql.org" References: <587d9b02-e4c4-c08e-4b70-169d029bd3e7@aklaver.com> From: Adrian Klaver Message-ID: <804d3055-b371-d914-7a77-1b9d8cf703cf@aklaver.com> Date: Thu, 5 Sep 2019 16:28:09 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <587d9b02-e4c4-c08e-4b70-169d029bd3e7@aklaver.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 9/5/19 4:24 PM, Adrian Klaver wrote: > On 9/5/19 4:06 PM, Kevin Brannen wrote: >>> From: Adrian Klaver >>> >>> On 9/5/19 2:57 PM, Kevin Brannen wrote: >>>> I think I need some help to understand what’s going here because I >>>> can’t figure it out and google isn’t helping. >>>> >>>> This is for Pg 9.6.5. (Yes, we are upgrading to 12.x in a few months, >>>> or so the plan is.) Pg code came from the community and we compiled it >>>> with no changes. This is on Centos 6.7, though I think the OS >>>> doesn’t matter. >>>> >>>> We’re calling pg_restore like: >>>> >>>> $PGPATH/pg_restore -jobs=$NCPU --dbname=x . >>>> >>>> FWIW, the backup was created with: >>>> >>>> $PGPATH/pg_dump --clean --create --format=d --jobs=$NCPU --file=$EXP >>>> --dbname=x >>> >>> The options you are adding for --clean, --create only have meaning >>> for plain text dumps. If you want those actions to occur on the >>> restore then add them to the pg_restore line. Though if you are going >>> to create a new database it will inherit objects from template1(as >>> you found below), assuming you have not set WITH TEMPLATE to >>> something else. >>> >> >> Good point that I'm not doing plain text dumps. >> >> Are you saying that my problem is that I need "--clean" on the >> pg_restore? > > No, just that if you where expecting the clean to happen on the restore > you would be disappointed. > >> I can try that. The fact that this only happens on a few DBs and not >> all still >> mystifies me. See below on the template.. > > My guess is you where restoring into a database with preexisting objects > because neither create or clean was being done. Just be aware that --clean & --create drops the existing database before creating a new one. > > > -- Adrian Klaver adrian.klaver@aklaver.com