Re: duplicate key value violates unique constraint "pg_class_relname_nsp_index"

Поиск
Список
Период
Сортировка
От Albe Laurenz
Тема Re: duplicate key value violates unique constraint "pg_class_relname_nsp_index"
Дата
Msg-id A737B7A37273E048B164557ADEF4A58B366169B0@ntex2010i.host.magwien.gv.at
обсуждение исходный текст
Ответ на duplicate key value violates unique constraint "pg_class_relname_nsp_index"  (Mitu Verma <mitu.verma@ericsson.com>)
Ответы Re: Re: duplicate key value violates unique constraint "pg_class_relname_nsp_index"
Список pgsql-general
Mitu Verma wrote:
> Following error is continuously seen with the postgreSQL database which we are using at customer site.
> 
> Current Errors observed: ./fm_db_VoiceReprocessing1/data/pg_log/postgresql-04.log:2015-04-04 01:00:16
> CESTERROR: duplicate key value violates unique constraint "pg_class_relname_nsp_index"
> 
> Any pointers on why these errors are coming? What is the meaning of duplicate key value violates
> unique constraint "pg_class_relname_nsp_index"
> 
> If it is due to some index corruption or duplicate index? Please help.

This is perfectly harmless from a data integrity point of view, it is just an error
message that the user gets when he or she tries to insert a row whose primary key
already exists in the table:

test=> CREATE TABLE test (id integer PRIMARY KEY, val text);
CREATE TABLE
test=> INSERT INTO test VALUES (1, 'one');
INSERT 0 1
test=> INSERT INTO test VALUES (2, 'one');
INSERT 0 1
test=> INSERT INTO test VALUES (1, 'two');
ERROR:  duplicate key value violates unique constraint "test_pkey"
DETAIL:  Key (id)=(1) already exists.

If you don't want user errors to be logged in the server log, you can
increase "log_min_messages" to "log".

Yours,
Laurenz Albe

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

Предыдущее
От: Albe Laurenz
Дата:
Сообщение: Re: Can we simulate Oracle Flashback with pg_export_snapshot()?
Следующее
От: Pete Hollobon
Дата:
Сообщение: Re: Re: duplicate key value violates unique constraint "pg_class_relname_nsp_index"