pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: worden.eric@gmail.com
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #14181: pg_upgrade: operator family "btree_hstore_ops" does not exist
Date: Tue, 07 Jun 2016 18:27:03 -0400
Message-ID: <17028.1465338423@sss.pgh.pa.us> (raw)
In-Reply-To: <20160607220520.1404.38974@wrigleys.postgresql.org>
References: <20160607220520.1404.38974@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

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



view thread (5+ messages)  latest in thread

Message-ID: <17028.1465338423@sss.pgh.pa.us>
Permalink:  ../17028.1465338423@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/17028.1465338423@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, worden.eric@gmail.com
  Subject: Re: BUG #14181: pg_upgrade: operator family "btree_hstore_ops" does not exist
  In-Reply-To: <17028.1465338423@sss.pgh.pa.us>
  References: <20160607220520.1404.38974@wrigleys.postgresql.org> <17028.1465338423@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox