From: Tom Lane <tgl@sss.pgh.pa.us>
To: Eric Worden <worden.eric@gmail.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: Fwd: BUG #14181: pg_upgrade: operator family "btree_hstore_ops" does not exist
Date: Wed, 08 Jun 2016 18:07:42 -0400
Message-ID: <12099.1465423662@sss.pgh.pa.us> (raw)
In-Reply-To: <CAN5pzZj3=EApRHWhpsW-C2-gtSbgw5pn6kE4rT2rYS7R-8hb9Q@mail.gmail.com>
References: <20160607220520.1404.38974@wrigleys.postgresql.org>
<17028.1465338423@sss.pgh.pa.us>
<CAN5pzZg6Z0kG=V=QwzDFvgCtyT30pU5n0X=U4B9fmF85SXycxQ@mail.gmail.com>
<CAN5pzZj3=EApRHWhpsW-C2-gtSbgw5pn6kE4rT2rYS7R-8hb9Q@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
Eric Worden <worden.eric@gmail.com> writes:
> On Tue, Jun 7, 2016 at 3:27 PM, Tom Lane <tgl@sss.pgh.pa.us> 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
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: Fwd: BUG #14181: pg_upgrade: operator family "btree_hstore_ops" does not exist
In-Reply-To: <12099.1465423662@sss.pgh.pa.us>
References: <20160607220520.1404.38974@wrigleys.postgresql.org> <17028.1465338423@sss.pgh.pa.us> <CAN5pzZg6Z0kG=V=QwzDFvgCtyT30pU5n0X=U4B9fmF85SXycxQ@mail.gmail.com> <CAN5pzZj3=EApRHWhpsW-C2-gtSbgw5pn6kE4rT2rYS7R-8hb9Q@mail.gmail.com> <12099.1465423662@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