Re: Table with seemingly duplicated primary key values

Поиск
Список
Период
Сортировка
От Melvin Davidson
Тема Re: Table with seemingly duplicated primary key values
Дата
Msg-id CANu8FiyFMNWuU=Y6uZbtDr591ytMfqfVzjjoi_tU1u4nQAN4AA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Table with seemingly duplicated primary key values  (Aleksander Łukasz <allllllx@gmail.com>)
Ответы Re: Table with seemingly duplicated primary key values  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Список pgsql-general
The fact that you have rows with an identical id of 2141750 verifies a corrupted primary index.
To correct it, you need to decide which row to keep.

So review the results of
SELECT * FROM some_table WHERE ctid =  (79664,59) OR ctid = (79772,23)

DELETE FROM some_table
WHERE id = 2147150
    AND field1 = {value for field1 of row to delete}
    AND field2 = {value for field2 of row to delete}
...
...
   AND fieldn = {value for fieldn of row to delete};

Then
 REINDEX TABLE some_table;

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

Предыдущее
От: oleg yusim
Дата:
Сообщение: Re: Session Identifiers
Следующее
От: oleg yusim
Дата:
Сообщение: Shared system resources