Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XyT24-0004HL-AX for pgsql-bugs@arkaria.postgresql.org; Tue, 09 Dec 2014 22:13:24 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XyT23-0007ey-Nb for pgsql-bugs@arkaria.postgresql.org; Tue, 09 Dec 2014 22:13:23 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XyT22-0007er-Qd for pgsql-bugs@postgresql.org; Tue, 09 Dec 2014 22:13:22 +0000 Received: from mwork.nabble.com ([162.253.133.43]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XyT1x-0001vi-IN for pgsql-bugs@postgresql.org; Tue, 09 Dec 2014 22:13:21 +0000 Received: from msam.nabble.com (unknown [162.253.133.85]) by mwork.nabble.com (Postfix) with ESMTP id A4461D2CC30 for ; Tue, 9 Dec 2014 14:13:16 -0800 (PST) Date: Tue, 9 Dec 2014 15:13:16 -0700 (MST) From: cowwoc To: pgsql-bugs@postgresql.org Message-ID: <1418163196370-5829821.post@n5.nabble.com> In-Reply-To: <25623.1418162623@sss.pgh.pa.us> References: <9917.1341462118@sss.pgh.pa.us> <20120705133253.GJ5578@momjian.us> <20120706233441.GA26828@momjian.us> <20120707144544.GF26828@momjian.us> <20120710214326.GA6315@momjian.us> <1418162132845-5829814.post@n5.nabble.com> <25623.1418162623@sss.pgh.pa.us> Subject: Re: BUG #6706: pg_upgrade fails when plpgsql dropped/re-created MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Tom Lane-2 wrote > cowwoc < > cowwoc@.darktech > > writes: >> My application invokes: >> DROP EXTENSION IF EXISTS hstore CASCADE >> followed by: >> CREATE EXTENSION IF NOT EXISTS hstore SCHEMA public >> and I get: >> org.postgresql.util.PSQLException: ERROR: duplicate key value violates >> unique constraint "pg_extension_name_index" >> Detail: Key (extname)=(hstore) already exists. > > That's bizarre. It sounds like there's something corrupt about your > pg_extension system catalog. Does "select * from pg_extension" show > reasonable-looking data? If so, try "REINDEX TABLE pg_extension". This error is quite random, so I'll have to try again the next time I run into it. I get the following output when the database is in a "good" state: extname, extowner, extnamespace, extrelocatable, extversion, extconfig, extcondition "plpgsql";10;11;f;"1.0";"";"" "hstore";13288111;2200;t;"1.2";"";"" Is that "reasonable-looking data"? Gili -- View this message in context: http://postgresql.nabble.com/BUG-6706-pg-upgrade-fails-when-plpgsql-dropped-re-created-tp5714220p5829821.html Sent from the PostgreSQL - bugs mailing list archive at Nabble.com. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs