Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1adQvX-00060g-2d for pgsql-general@arkaria.postgresql.org; Tue, 08 Mar 2016 23:20:31 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1adQvW-00010k-HL for pgsql-general@arkaria.postgresql.org; Tue, 08 Mar 2016 23:20:30 +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) (envelope-from ) id 1adQvT-0000yC-F8 for pgsql-general@postgresql.org; Tue, 08 Mar 2016 23:20:27 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1adQvO-0006Vz-PQ for pgsql-general@postgresql.org; Tue, 08 Mar 2016 23:20:26 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id CF75B20A92 for ; Tue, 8 Mar 2016 18:20:20 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute5.internal (MEProxy); Tue, 08 Mar 2016 18:20:20 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=aklaver.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=89LmEIiTDQefYd4BooMzd9m991I=; b=ONu8IG da9+A9CSIsYg9RFk6HQYzBsxjx9Y3rXP4F3G7d5UT2Se+hQO9cfk3ZQROobKdifY isxaBqZJzGWmzyobgqBb3FBQlVwfGuJGzgybWGS3zcd6LIOS4hPfPDrjU7a0V9AU bnYfcJW52Bb0PaEZNgIuHQ0zZnjdThEzX3R4g= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=89LmEIiTDQefYd4 BooMzd9m991I=; b=aNIDyecQvDSkGmXUp7u6EV8aIXyYXfvUViIuSZdvbTkljN6 6kWFNn5Pzz8HnGNyZ3QeTUZR1wfhr+yhHntAC44cIAs50DHUQ46AubKzKBbI6wvx 8bcAeypB7vEUvRReBS68wOF97CmJ+czW0qxA/x3N+AXbHAolZ+MkEIZY1xFM= X-Sasl-enc: fnxE6swU+kcG0AQVz6l6pKlQncqDI81GYmHy/Eax87hd 1457479220 Received: from [192.168.1.2] (174-21-70-246.tukw.qwest.net [174.21.70.246]) by mail.messagingengine.com (Postfix) with ESMTPA id 4B38F680172; Tue, 8 Mar 2016 18:20:20 -0500 (EST) Subject: Re: pg_upgrade error regarding hstore operator To: "Feld, Michael (IMS)" , "pgsql-general@postgresql.org" References: <4b5993299ed948728e2ad6e278861807@NAIAD.omni.imsweb.com> From: Adrian Klaver Message-ID: <56DF5DE3.5030305@aklaver.com> Date: Tue, 8 Mar 2016 15:18:59 -0800 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <4b5993299ed948728e2ad6e278861807@NAIAD.omni.imsweb.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.7 (--) 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 On 03/08/2016 10:27 AM, Feld, Michael (IMS) wrote: > I am attempting to upgrade my organization's database cluster from 9.1.19 to 9.5.1 using the pg_upgrade utility. After some processing, the tool bails out with the following error in the log: > > pg_restore: creating OPERATOR "public.=>" > pg_restore: [archiver (db)] Error while PROCESSING TOC: > pg_restore: [archiver (db)] Error from TOC entry 5660; 2617 5655672 OPERATOR => postgres > pg_restore: [archiver (db)] could not execute query: ERROR: syntax error at or near "=>" > LINE 1: CREATE OPERATOR => ( > ^ > Command was: CREATE OPERATOR => ( > PROCEDURE = "hstore", > LEFTARG = "text", > RIGHTARG = "text" > ); > > -- For binary upgrade, handle... > > I tried dropping the operator before doing the upgrade but it's dependent on the existence of the hstore extension. Ideas? Believe it has to do with this: http://www.postgresql.org/docs/9.5/interactive/release-9-5.html " Allow => to specify named parameters in function calls (Pavel Stehule) E.2.3.7. Functions Previously only := could be used. This requires removing the possibility for => to be a user-defined operator. Creation of user-defined => operators has been issuing warnings since PostgreSQL 9.0." and the removal of => as operator from here: http://www.postgresql.org/docs/9.5/interactive/hstore.html I remember a similar problem with just a regular dump/restore. If I remember correctly I solved it by doing: \dx in psql to see what extensions where installed and when I did not see hstore doing: http://www.postgresql.org/docs/9.1/interactive/sql-createextension.html " CREATE EXTENSION hstore SCHEMA public FROM unpackaged; Be careful to specify the schema in which you installed the existing hstore objects." on the older Postgres version and then repeating the dump/restore. > > ________________________________ > > 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 employee or agent of the addressee(s), please note that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this e-mail in error, please notify the sender of the error. > > -- Adrian Klaver adrian.klaver@aklaver.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general