Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1anw0Z-000361-Ch for pgsql-general@arkaria.postgresql.org; Wed, 06 Apr 2016 22:33:07 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1anw0Y-0004gl-UR for pgsql-general@arkaria.postgresql.org; Wed, 06 Apr 2016 22:33:06 +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 1antxE-0000fG-DX for pgsql-general@postgresql.org; Wed, 06 Apr 2016 20:21:32 +0000 Received: from util-st-02.imsweb.com ([204.132.58.65]) by magus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1antx8-00034o-CK for pgsql-general@postgresql.org; Wed, 06 Apr 2016 20:21:31 +0000 Received: from THALASSA.omni.imsweb.com (thalassa.omni.imsweb.com [172.22.64.102]) by util-st-02.imsweb.com (Postfix) with ESMTP id 16379E1608; Wed, 6 Apr 2016 16:21:24 -0400 (EDT) Received: from NAIAD.omni.imsweb.com (172.22.64.103) by THALASSA.omni.imsweb.com (172.22.64.102) with Microsoft SMTP Server (TLS) id 15.0.1178.4; Wed, 6 Apr 2016 16:21:23 -0400 Received: from NAIAD.omni.imsweb.com ([172.22.64.103]) by NAIAD.omni.imsweb.com ([172.22.64.103]) with mapi id 15.00.1178.000; Wed, 6 Apr 2016 16:21:23 -0400 From: "Feld, Michael (IMS)" To: Tom Lane CC: "pgsql-general@postgresql.org" Subject: Re: pg_upgrade error regarding hstore operator Thread-Topic: [GENERAL] pg_upgrade error regarding hstore operator Thread-Index: AdF5Z2tvCSwX6/yiTD6b7QV8/DOIOgAAJ0qwABTKRoAFoXlUUA== Date: Wed, 6 Apr 2016 20:21:22 +0000 Message-ID: <15c0241a4a14409d9bda8c29a9673d68@NAIAD.omni.imsweb.com> References: <4b5993299ed948728e2ad6e278861807@NAIAD.omni.imsweb.com> <22170.1457479307@sss.pgh.pa.us> In-Reply-To: <22170.1457479307@sss.pgh.pa.us> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [204.132.58.76] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Pg-Spam-Score: -2.9 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-general Precedence: bulk Sender: pgsql-general-owner@postgresql.org Thanks for the assist Tom. That worked for us. Noticing a different issue f= ollowing the pg_upgrade. If we take a pg_dump of a database on this upgrade= d instance with the hstore extension and try to pg_restore it back up to th= e same instance we get the following errors (ignore the likeness to your na= me, apparently when this cluster was created years ago they chose to set it= up in your honor): pg_restore: [archiver (db)] Error while PROCESSING TOC: pg_restore: [archiver (db)] Error from TOC entry 3879; 2753 745119 OPERATOR= FAMILY btree_ hstore_ops tomlane pg_restore: [archiver (db)] could not execute query: ERROR: operator famil= y "btree_hstore_ops" for access method "btree" already exists Command was: CREATE OPERATOR FAMILY btree_hstore_ops USING btree; pg_restore: [archiver (db)] Error from TOC entry 3880; 2753 745127 OPERATOR= FAMILY gin_hs tore_ops tomlane pg_restore: [archiver (db)] could not execute query: ERROR: operator famil= y "gin_hstore_ops" for access method "gin" already exists Command was: CREATE OPERATOR FAMILY gin_hstore_ops USING gin; pg_restore: [archiver (db)] Error from TOC entry 3881; 2753 745137 OPERATOR= FAMILY gist_h store_ops tomlane pg_restore: [archiver (db)] could not execute query: ERROR: operator famil= y "gist_hstore_ops" for access method "gist" already exists Command was: CREATE OPERATOR FAMILY gist_hstore_ops USING gist; pg_restore: [archiver (db)] Error from TOC entry 3882; 2753 745151 OPERATOR= FAMILY hash_h store_ops tomlane pg_restore: [archiver (db)] could not execute query: ERROR: operator famil= y "hash_hstore_ops" for access method "hash" already exists Command was: CREATE OPERATOR FAMILY hash_hstore_ops USING hash; We do not have this issue for any new databases created following the pg_up= grade. I noticed that new databases have the hstore 1.3 version while the o= riginals still have the 1.1 version. I updated the extension on one of thes= e to see if that would resolve the issue and it did not. Thanks for any hel= p you can offer. -----Original Message----- From: Tom Lane [mailto:tgl@sss.pgh.pa.us] Sent: Tuesday, March 08, 2016 6:22 PM To: Feld, Michael (IMS) Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] pg_upgrade error regarding hstore operator "Feld, Michael (IMS)" 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 =3D> was de= precated 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 =3D> (text, text); DROP OPERATOR =3D> = (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 ________________________________ Information in this e-mail may be confidential. It is intended only for the= addressee(s) identified above. If you are not the addressee(s), or an empl= oyee or agent of the addressee(s), please note that any dissemination, dist= ribution, or copying of this communication is strictly prohibited. If you h= ave received this e-mail in error, please notify the sender of the error. --=20 Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general