pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: cowwoc <cowwoc@bbs.darktech.org>
To: pgsql-bugs@postgresql.org
Subject: Re: BUG #6706: pg_upgrade fails when plpgsql dropped/re-created
Date: Mon, 12 Jan 2015 13:58:30 -0700 (MST)
Message-ID: <1421096310746-5833673.post@n5.nabble.com> (raw)
In-Reply-To: <20150112181916.GG2092@awork2.anarazel.de>
References: <20120706233441.GA26828@momjian.us>
	<CAOtHd0ByqHPBRvExZgHfX4F28sYtAu2koDFAyJ8ZPo2qZ4kN1Q@mail.gmail.com>
	<20120707144544.GF26828@momjian.us>
	<CAOtHd0C-mZUBRV1Wb6CE4thdVyysOfODYAaRKOQQX1etBT1M3A@mail.gmail.com>
	<20120710214326.GA6315@momjian.us>
	<1418162132845-5829814.post@n5.nabble.com>
	<25623.1418162623@sss.pgh.pa.us>
	<1418163196370-5829821.post@n5.nabble.com>
	<26324.1418163943@sss.pgh.pa.us>
	<20150112181916.GG2092@awork2.anarazel.de>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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-tp5714220p583...
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



view thread (28+ messages)

Message-ID: <1421096310746-5833673.post@n5.nabble.com>
Permalink:  ../1421096310746-5833673.post@n5.nabble.com/
Also on:    postgresql.org/message-id/1421096310746-5833673.post@n5.nabble.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: cowwoc@bbs.darktech.org
  Subject: Re: BUG #6706: pg_upgrade fails when plpgsql dropped/re-created
  In-Reply-To: <1421096310746-5833673.post@n5.nabble.com>
  References: <20120706233441.GA26828@momjian.us> <CAOtHd0ByqHPBRvExZgHfX4F28sYtAu2koDFAyJ8ZPo2qZ4kN1Q@mail.gmail.com> <20120707144544.GF26828@momjian.us> <CAOtHd0C-mZUBRV1Wb6CE4thdVyysOfODYAaRKOQQX1etBT1M3A@mail.gmail.com> <20120710214326.GA6315@momjian.us> <1418162132845-5829814.post@n5.nabble.com> <25623.1418162623@sss.pgh.pa.us> <1418163196370-5829821.post@n5.nabble.com> <26324.1418163943@sss.pgh.pa.us> <20150112181916.GG2092@awork2.anarazel.de> <1421096310746-5833673.post@n5.nabble.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox