Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bAPTP-0003Ul-Pc for pgsql-bugs@arkaria.postgresql.org; Tue, 07 Jun 2016 22:27:47 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bAPTP-0007c4-Ch for pgsql-bugs@arkaria.postgresql.org; Tue, 07 Jun 2016 22:27:47 +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 1bAPSm-0006um-8l for pgsql-bugs@postgresql.org; Tue, 07 Jun 2016 22:27:08 +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 1bAPSj-0000Hr-Mu for pgsql-bugs@postgresql.org; Tue, 07 Jun 2016 22:27:07 +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 u57MR3hc017029; Tue, 7 Jun 2016 18:27:03 -0400 From: Tom Lane To: worden.eric@gmail.com cc: pgsql-bugs@postgresql.org Subject: Re: BUG #14181: pg_upgrade: operator family "btree_hstore_ops" does not exist In-reply-to: <20160607220520.1404.38974@wrigleys.postgresql.org> References: <20160607220520.1404.38974@wrigleys.postgresql.org> Comments: In-reply-to worden.eric@gmail.com message dated "Tue, 07 Jun 2016 22:05:20 -0000" Date: Tue, 07 Jun 2016 18:27:03 -0400 Message-ID: <17028.1465338423@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 worden.eric@gmail.com writes: > I'm attempting to upgrade from 9.4.8. hstore installed version on the 9.4 > cluster is 1.3. It also failed with version 1.2. > pg_upgrade is exiting with failure during the step "Restoring database > schemas in the new cluster". Several database schemas are restored > successfully, then one fails. The pg_restore log indicated by the pg_upgrade > output ends with: > pg_restore: [archiver (db)] could not execute query: ERROR: operator family > "btree_hstore_ops" does not exist for access method "btree" > Command was: CREATE OPERATOR CLASS "btree_hstore_ops" > DEFAULT FOR TYPE "hstore" USING "btree" FAMILY "btree_hstore_ops" AS > OPERAT... Hmm. Is there, by any chance, a CREATE OPERATOR FAMILY "btree_hstore_ops" command somewhere later in the dump? 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 ? I'm suspicious that there may only be operator classes, not operator families, linked to the extension. If you don't see them, then I'm betting that you previously pg_upgraded this same database from 9.3 or before, and fell victim to a bug we recently fixed that caused pg_upgrade to drop such operator families from their extensions. You could fix that with manual ALTER EXTENSION ADD OPERATOR FAMILY commands in affected database(s). After that, pg_upgrade'ing should work. > The documentation for CREATE OPERATOR CLASS says that the operator family > will be created if it does not already exist, contrary to what the error > message says here. Not if there's an explicit FAMILY clause; that's supposed to refer to a pre-existing family. 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