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 1i6Mth-0005Hc-2I for pgsql-general@arkaria.postgresql.org; Fri, 06 Sep 2019 22:40:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i6Mtf-0006QO-Jc for pgsql-general@arkaria.postgresql.org; Fri, 06 Sep 2019 22:40:03 +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 1i6Mte-000635-3k for pgsql-general@lists.postgresql.org; Fri, 06 Sep 2019 22:40:03 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i6Mta-0003Zv-8T for pgsql-general@postgresql.org; Fri, 06 Sep 2019 22:40:01 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id DB85522063; Fri, 6 Sep 2019 18:39:55 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Fri, 06 Sep 2019 18:39:55 -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=z JGVCXyClYDKJaqPFMCigLWqXs9dJCV4uNs0SVnqqFk=; b=I6yUSXnBBpcJr76gM CyAeL099pEjBWulMRYbqTg99Um7kbxd/7+g9insY9zneJR+zcmYQ/9ot8yaKK+5O HABMGl3xf1t2Xu8MitmRb7WFvpCNOBMSUg3Uu9EDsRpqakgORw7zWZLu58hjLpAs zo+AnOt0qbYhIFQ+M3pdEZhCiT/lezR+EhzbAzxYS3Qg8oLJiqfVhYYg9MVq3DWf jSi45fTgbpnJ8pPCkkVAxQB4EqTFknXN9HxjAq/hMNAxj2zQILUA4PEhhpfelIil Gsr9+zS3voZagaUK7lPQZDr9Ds2ELTGwvFSGD87U9a+reKH5flwinC7p5UwLEqxG XYF3Q== 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=zJGVCXyClYDKJaqPFMCigLWqXs9dJCV4uNs0SVnqq Fk=; b=LHzJNcXPn5D13iFebTVpUlNjYBub1l2vzNhnxALVkHCiid03NDk+uTnkY TobGCk3bNmCoyT7nLr7LbGzTytEY1cQHEQGch6ctwKIl+v+HHTrUwZrAvKalHiVB v4vGhMEMKV87ykXvfiCe4LMWVdviSeCjBkZXZBMFLrmxkSdu0X9shcgliHXiuJqo 9RBQfvSOBwtNmeyCQIf9kmgXRYYRcXMMjQ/YONWtKy3iNcKbpqQHsPIc5Jnq90Ay ih0DKPxjCa/kA869wLptUQeeyQDr/+C7zZo5CBYNjTthr8feW5+/m6CECQdwE0Bf fJ7Y/1kXJl1b/LYgRmsWCuKm4sBlA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrudektddgudduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtgfesthejredttdefjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucffohhmrghinhepphhoshhtghhrvghsqhhlrdhorhhgnecukfhppeejuddrvddu vddrudehtddrvddtvdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklh grvhgvrhesrghklhgrvhgvrhdrtghomhenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from [192.168.1.4] (unknown [71.212.150.202]) by mail.messagingengine.com (Postfix) with ESMTPA id 391EAD6005A; Fri, 6 Sep 2019 18:39:55 -0400 (EDT) Subject: Re: pg_restore issues with intarray To: Kevin Brannen , "pgsql-general@postgresql.org" References: <587d9b02-e4c4-c08e-4b70-169d029bd3e7@aklaver.com> <804d3055-b371-d914-7a77-1b9d8cf703cf@aklaver.com> <0e059013-15d7-b586-db9f-5ccd653b0689@aklaver.com> From: Adrian Klaver Message-ID: <0ef348c2-baa1-cbb7-5a8d-2f62c12d16ef@aklaver.com> Date: Fri, 6 Sep 2019 15:39:54 -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: 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 9/6/19 8:45 AM, Kevin Brannen wrote: >> From: Adrian Klaver >> On 9/5/19 5:05 PM, Kevin Brannen wrote: >>> >>> It feels like the restore is adding the intarray extension, which does >>> a CREATE OPERATOR FAMILY on its own, then later the restore does >>> CREATE OPERATOR FAMILY on again causing the problem. Yet this doesn't >>> happen on most of our databases, just a few. It's maddening to me. >>> >> What does \dx show in the database you taking the dump from? > > Sadly, I don't have access to that system. > >> What if you do a restore to a file only the schema e.g.: >> >> pg_restore -s -f some_file.sql >> >> This will create a plain text version of only the schema objects in some_file.sql instead of restoring to the database. It might help shed some light. > > No CREATE EXTENSION or CREATE OPERATOR FAMILY statements. I do not see that as possible. Something ran CREATE OPERATOR FAMILY: pg_restore: [archiver (db)] could not execute query: ERROR: operator family "gin__int_ops" for access method "gin" already exists Command was: CREATE OPERATOR FAMILY gin__int_ops USING gin; So either someone opened up template0 and loaded the extension into it or the dump file has the CREATE OPERATOR FAMILY in it. Another thought search on intarray. > > Jerry's post indicates this is something that just happens with some older > versions and it seems I got unlucky. I do have a work around (ignore) but > I'd rather be proactive in knowing I'm ignoring something I should be and > not ignoring meaningful errors. We are not dealing with magic here, there is some mechanism at work. Dollars to donuts there is an unpackaged version of the extension in one or more of the source databases. See below for more information on this: https://www.postgresql.org/docs/11/extend-extensions.html 38.16.5. Extension Updates You will need to look at the source databases in situ. > > Thanks for the help Adrian, I really appreciate it! -- Adrian Klaver adrian.klaver@aklaver.com