Re: pg_upgrade error regarding hstore operator - Mailing list pgsql-general

From Tom Lane
Subject Re: pg_upgrade error regarding hstore operator
Date
Msg-id 22170.1457479307@sss.pgh.pa.us
Whole thread Raw
In response to pg_upgrade error regarding hstore operator  ("Feld, Michael (IMS)" <FeldM@imsweb.com>)
Responses Re: pg_upgrade error regarding hstore operator  ("Feld, Michael (IMS)" <FeldM@imsweb.com>)
List pgsql-general
"Feld, Michael (IMS)" <FeldM@imsweb.com> writes:
> I am attempting to upgrade my organization's database cluster from
> 9.1.19 to 9.5.1 using the pg_upgrade utility.

That's kind of a big jump :-( ... you missed the versions where =>
was deprecated as an operator name.

> I tried dropping the operator before doing the upgrade but it's dependent on the existence of the hstore extension.
Ideas?

The clean solution would be to copy share/extension/hstore--1.0--1.1.sql
from the 9.5 installation into the 9.1 installation and then do

ALTER EXTENSION hstore UPDATE TO '1.1';

Under the hood that's just doing

ALTER EXTENSION hstore DROP OPERATOR => (text, text);
DROP OPERATOR => (text, text);

but if you did that manually, you'd have a problem when you want to update
hstore to current versions later.  If you do what I suggest, the extension
will properly look like it's 1.1 after pg_upgrade'ing.

            regards, tom lane


pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: pg_upgrade error regarding hstore operator
Next
From:
Date:
Subject: Re: Does a call to a language handler provide a context/session, and somewhere to keep session data?