Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XySsp-0003v1-6M for pgsql-bugs@arkaria.postgresql.org; Tue, 09 Dec 2014 22:03:51 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XySso-0005Kx-Lo for pgsql-bugs@arkaria.postgresql.org; Tue, 09 Dec 2014 22:03:50 +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 1XySsn-0005Jc-So for pgsql-bugs@postgresql.org; Tue, 09 Dec 2014 22:03:49 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XySsk-0001kB-AX for pgsql-bugs@postgresql.org; Tue, 09 Dec 2014 22:03:48 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id sB9M3hUb025624; Tue, 9 Dec 2014 17:03:43 -0500 From: Tom Lane To: cowwoc cc: pgsql-bugs@postgresql.org Subject: Re: BUG #6706: pg_upgrade fails when plpgsql dropped/re-created In-reply-to: <1418162132845-5829814.post@n5.nabble.com> References: <20120702172836.GB25966@momjian.us> <20120704213703.GH5578@momjian.us> <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> Comments: In-reply-to cowwoc message dated "Tue, 09 Dec 2014 14:55:32 -0700" Date: Tue, 09 Dec 2014 17:03:43 -0500 Message-ID: <25623.1418162623@sss.pgh.pa.us> 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 cowwoc 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". regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs