Re: pg_upgrade error regarding hstore operator

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Feld, Michael (IMS)" <FeldM(at)imsweb(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: pg_upgrade error regarding hstore operator
Date: 2016-03-08 23:21:47
Message-ID: 22170.1457479307@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

"Feld, Michael (IMS)" <FeldM(at)imsweb(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message david 2016-03-08 23:44:16 Re: Does a call to a language handler provide a context/session, and somewhere to keep session data?
Previous Message Adrian Klaver 2016-03-08 23:18:59 Re: pg_upgrade error regarding hstore operator

Browse pgsql-hackers by date

  From Date Subject
Next Message Joshua D. Drake 2016-03-08 23:32:01 Re: silent data loss with ext4 / all current versions
Previous Message Adrian Klaver 2016-03-08 23:18:59 Re: pg_upgrade error regarding hstore operator