Re: Table with seemingly duplicated primary key values

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Table with seemingly duplicated primary key values
Дата
Msg-id 13281.1450798404@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Table with seemingly duplicated primary key values  (Aleksander Łukasz <allllllx@gmail.com>)
Список pgsql-general
=?UTF-8?Q?Aleksander_=C5=81ukasz?= <allllllx@gmail.com> writes:
> a table in our database with about 3 million rows ended up in a state
> where its seems to have duplicated entries (duplicated primary key values):
> ...
> Do you have any idea what could be happening and what measures should be
> undertaken to fix this issue? Thanks.

Looks like corruption of the primary key index.  Try REINDEXing that
index.  This might fail if there actually are duplicate rows in the table
and not just incorrect pointers to them in the index, in which case you'll
have to clean up the duplicates somehow and try again till the REINDEX
succeeds.

            regards, tom lane


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

Предыдущее
От: Aleksander Łukasz
Дата:
Сообщение: Table with seemingly duplicated primary key values
Следующее
От: Melvin Davidson
Дата:
Сообщение: Re: Table with seemingly duplicated primary key values