From: Heikki Linnakangas <hlinnakangas@vmware.com>
To: christian@schlichtherle.de
To: pgsql-bugs@postgresql.org
Subject: Re: BUG #9956: Concurrency bug in CREATE TABLE IF NOT EXISTS statement
Date: Fri, 11 Apr 2014 22:55:01 +0300
Message-ID: <53484895.80209@vmware.com> (raw)
In-Reply-To: <20140411145120.10532.93247@wrigleys.postgresql.org>
References: <20140411145120.10532.93247@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
On 04/11/2014 05:51 PM, christian@schlichtherle.de wrote:
> The following bug has been logged on the website:
>
> Bug reference: 9956
> Logged by: Christian Schlichtherle
> Email address: christian@schlichtherle.de
> PostgreSQL version: 9.3.4
> Operating system: Mac OS X 10.9.2
> Description:
>
> Apparently, the CREATE TABLE IF NOT EXISTS statement is not properly
> isolated. The following test exposes the issue using JDBC:
>
> <pre><code>
> ...
> </code></pre>
>
> The result of running this test is always the following exception stack
> trace.
>
> <pre><code>
> java.util.concurrent.ExecutionException: org.postgresql.util.PSQLException:
> ERROR: duplicate key value violates unique constraint
> "pg_type_typname_nsp_index"
> Detail: Key (typname, typnamespace)=(foo, 2200) already exists.
Yeah, that's a known issue. See
http://www.postgresql.org/message-id/4F9541D3.1000202@beccati.com.
It's OK for normal DDL commands to rely on the constraint, but I agree
it's pretty surprising for IF NOT EXISTS.
- Heikki
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
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: hlinnakangas@vmware.com, christian@schlichtherle.de
Subject: Re: BUG #9956: Concurrency bug in CREATE TABLE IF NOT EXISTS statement
In-Reply-To: <53484895.80209@vmware.com>
References: <20140411145120.10532.93247@wrigleys.postgresql.org> <53484895.80209@vmware.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