Andres Freund-3 wrote
> cowwoc just talked about this on irc, and the explanation very likely is
> that the extension commands are run in parallel on several
> connections.
>
> Greetings,
>
> Andres Freund
Correct. Executing
CREATE EXTENSION IF NOT EXISTS hstore SCHEMA public
concurrently from multiple connections triggers the error in question.
Andres suggested the following workaround which worked for me:
LOCK pg_extension;
CREATE EXTENSION IF NOT EXISTS hstore SCHEMA public;
Meaning, simply lock pg_extension before attempting to create the extension.
Gili
--
View this message in context:
http://postgresql.nabble.com/BUG-6706-pg-upgrade-fails-when-plpgsql-dropped-re-created-tp5714220p5833673.html
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.