Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aq62x-0006zS-F8 for pgsql-general@arkaria.postgresql.org; Tue, 12 Apr 2016 21:40:31 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1aq62x-0002fO-22 for pgsql-general@arkaria.postgresql.org; Tue, 12 Apr 2016 21:40:31 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1aq62w-0002dI-9D for pgsql-general@postgresql.org; Tue, 12 Apr 2016 21:40:30 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1aq62t-0001Ad-CW for pgsql-general@postgresql.org; Tue, 12 Apr 2016 21:40:29 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u3CLeP7Q018104; Tue, 12 Apr 2016 17:40:25 -0400 From: Tom Lane To: "Feld, Michael (IMS)" cc: "pgsql-general@postgresql.org" Subject: Re: pg_upgrade error regarding hstore operator In-reply-to: References: <4b5993299ed948728e2ad6e278861807@NAIAD.omni.imsweb.com> <22170.1457479307@sss.pgh.pa.us> <15c0241a4a14409d9bda8c29a9673d68@NAIAD.omni.imsweb.com> <4937.1459983664@sss.pgh.pa.us> Comments: In-reply-to "Feld, Michael (IMS)" message dated "Thu, 07 Apr 2016 20:04:48 -0000" Date: Tue, 12 Apr 2016 17:40:25 -0400 Message-ID: <18103.1460497225@sss.pgh.pa.us> X-Pg-Spam-Score: -2.9 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-general Precedence: bulk Sender: pgsql-general-owner@postgresql.org "Feld, Michael (IMS)" writes: > Thanks for the reply Tom. template1 is definitely empty and does not contain any hstore objects. I did a little debugging and placed the below SQL before and after the hstore creation in the file produced by the pg_dump and determined that these operator objects only become present immediately after the creation of the hstore extension, and not before. Then, much later down the pg_dump file, it attempts to create the operator family for these 4 items producing the errors. I did a pg_dump of the same database on a 9.1 instance and it does not produce the operator creation objects SQL outside of the extension. This seems to be something that happened as part of the pg_upgrade. Any idea why these have showed up outside the extension? Is there anything I can do to fix this? Thanks for all of your help. I got some time today to try to reproduce this problem, and failed. What I did was: * install hstore 1.0 extension in a 9.1 database * upgrade the extension to 1.1 (as per instructions upthread) * pg_upgrade the database to HEAD * pg_dump the database The pg_dump output shows the expected CREATE EXTENSION command and no other extraneous objects. So the procedure is fine. I have to conclude there was something weird about the initial state of your 9.1 database. I have too little info to say what exactly. > SELECT am.amname AS index_method, > opf.opfname AS opfamily_name, > amop.amopopr::regoperator AS opfamily_operator > FROM pg_am am, pg_opfamily opf, pg_amop amop > WHERE opf.opfmethod = am.oid AND > amop.amopfamily = opf.oid and opf.opfname like '%hstore%' > ORDER BY index_method, opfamily_name, opfamily_operator; Uh, what did you get from that query? Might also be useful to see select * from pg_opclass where opcintype = 'hstore'::regtype; and the output of "\dx+ hstore" in psql. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general