From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Melvin Davidson <melvin6925@gmail.com>
To: Mitu Verma <mitu.verma@ericsson.com>
Cc: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: Re: duplicate key value violates unique constraint "pg_class_relname_nsp_index"
Date: Wed, 27 May 2015 06:32:37 -0700
Message-ID: <5565C775.3070609@aklaver.com> (raw)
In-Reply-To: <CANu8Fix9awzDHEJjcWnnqSxTESaAhkUMwRVN34GZzD-X0D3FyQ@mail.gmail.com>
References: <84BC7AB0D621A74893EC9C9E151293B0226AD107@ESESSMB207.ericsson.se>
<CANu8Fix9awzDHEJjcWnnqSxTESaAhkUMwRVN34GZzD-X0D3FyQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-general>
On 05/27/2015 06:05 AM, Melvin Davidson wrote:
> What this indicates is that someone, or some thing, is trying to create
> a table in a schema that already exists.
The error you see in that situation is:
postgres-2015-05-27 06:25:10.173 PDT-0ERROR: relation "table1" already
exists
postgres-2015-05-27 06:25:10.173 PDT-0STATEMENT: create table table1 (i
int);
Best guess is as Pete and Albe said, some user code is directly
accessing pg_class or the index has been corrupted.
> Here is the structure of pg_class_relname_nsp_index:
> CREATE UNIQUE INDEX pg_class_relname_nsp_index ON pg_class USING btree
> (relname, relnamespace)
>
> What you should also see in the error log is a line immediately
> following that error which shows you exactly what the conflict is, but
> you have not provided that to us.
>
--
Adrian Klaver
adrian.klaver@aklaver.com
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
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-general@postgresql.org
Cc: adrian.klaver@aklaver.com, melvin6925@gmail.com, mitu.verma@ericsson.com
Subject: Re: duplicate key value violates unique constraint "pg_class_relname_nsp_index"
In-Reply-To: <5565C775.3070609@aklaver.com>
References: <84BC7AB0D621A74893EC9C9E151293B0226AD107@ESESSMB207.ericsson.se> <CANu8Fix9awzDHEJjcWnnqSxTESaAhkUMwRVN34GZzD-X0D3FyQ@mail.gmail.com> <5565C775.3070609@aklaver.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