Re: BUG #6706: pg_upgrade fails when plpgsql dropped/re-created

Поиск
Список
Период
Сортировка
От cowwoc
Тема Re: BUG #6706: pg_upgrade fails when plpgsql dropped/re-created
Дата
Msg-id 1421096310746-5833673.post@n5.nabble.com
обсуждение исходный текст
Ответ на Re: BUG #6706: pg_upgrade fails when plpgsql dropped/re-created  (Andres Freund <andres@2ndquadrant.com>)
Список pgsql-bugs
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.

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: BUG #6706: pg_upgrade fails when plpgsql dropped/re-created
Следующее
От: koizumistr@minos.ocn.ne.jp
Дата:
Сообщение: BUG #12534: missing 'with' at X055