Re: BUG #6706: pg_upgrade fails when plpgsql dropped/re-created - Mailing list pgsql-bugs

From cowwoc
Subject Re: BUG #6706: pg_upgrade fails when plpgsql dropped/re-created
Date
Msg-id 1418163196370-5829821.post@n5.nabble.com
Whole thread Raw
In response to Re: BUG #6706: pg_upgrade fails when plpgsql dropped/re-created  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #6706: pg_upgrade fails when plpgsql dropped/re-created
List pgsql-bugs
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.

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #6706: pg_upgrade fails when plpgsql dropped/re-created
Next
From: Tom Lane
Date:
Subject: Re: BUG #6706: pg_upgrade fails when plpgsql dropped/re-created