Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bAldh-0007f0-Sf for pgsql-bugs@arkaria.postgresql.org; Wed, 08 Jun 2016 22:07:53 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bAldh-0006XE-8E for pgsql-bugs@arkaria.postgresql.org; Wed, 08 Jun 2016 22:07:53 +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_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bAldf-0006X5-RC for pgsql-bugs@postgresql.org; Wed, 08 Jun 2016 22:07:51 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bAldY-0005ci-LP for pgsql-bugs@postgresql.org; Wed, 08 Jun 2016 22:07:51 +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 u58M7gfP012100; Wed, 8 Jun 2016 18:07:42 -0400 From: Tom Lane To: Eric Worden cc: pgsql-bugs@postgresql.org Subject: Re: Fwd: BUG #14181: pg_upgrade: operator family "btree_hstore_ops" does not exist In-reply-to: References: <20160607220520.1404.38974@wrigleys.postgresql.org> <17028.1465338423@sss.pgh.pa.us> Comments: In-reply-to Eric Worden message dated "Wed, 08 Jun 2016 12:11:32 -0700" Date: Wed, 08 Jun 2016 18:07:42 -0400 Message-ID: <12099.1465423662@sss.pgh.pa.us> X-Pg-Spam-Score: -3.3 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Eric Worden writes: > On Tue, Jun 7, 2016 at 3:27 PM, Tom Lane wrote: >> Hmm. Is there, by any chance, a CREATE OPERATOR FAMILY "btree_hstore_ops" >> command somewhere later in the dump? > No there wasn't. However I believe your diagnosis below was correct (I > don't know the history of this system). I did CREATE OPERATOR FAMILY, > followed by ALTER EXTENSION > ADD OPERATOR FAMILY. [ squint ... ] This seems quite wrong. It is not possible to have an operator class that's not part of an operator family, or at least I hope not, so there should definitely have been an opfamily present even if it was not marked as belonging to the extension. I wonder if you don't now have *two* operator families, presumably within different schemas. >> Also, if you do >> \dx+ hstore >> in the problematic 9.4 database, do you see lines like >> operator family btree_hstore_ops for access method btree >> operator family gin_hstore_ops for access method gin >> operator family gist_hstore_ops for access method gist >> operator family hash_hstore_ops for access method hash > No I did not. Now in the upgraded system I do see those. However, before > upgrade in the 9.4 cluster I created an empty test database and did CREATE > EXTENSION hstore. In the test database \dx+ hstore does not list the lines > above in the 9.4 or 9.5 system. Is this a problem? That makes no sense at all. I definitely do see this in 9.4 after creating hstore 1.3: regression=# \dx+ hstore ... operator class btree_hstore_ops for access method btree operator class gin_hstore_ops for access method gin operator class gist_hstore_ops for access method gist operator class hash_hstore_ops for access method hash operator family btree_hstore_ops for access method btree operator family gin_hstore_ops for access method gin operator family gist_hstore_ops for access method gist operator family hash_hstore_ops for access method hash ... And, again, it does not look like it's possible to have an opclass without a containing opfamily --- if CREATE OPERATOR CLASS does not find a family to link to, it will make one. So there should be an entry by that name, even if it somehow doesn't get attached to the extension. It might be interesting to do select oid,* from pg_opfamily where opfname like '%hstore%'; select oid,* from pg_opclass where opcname like '%hstore%'; and see what you get. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs