Re: Primary key duplicates

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Primary key duplicates
Дата
Msg-id 26276.1092425882@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Primary key duplicates  (Zeki Mokhtarzada <zeki@freewebz.com>)
Ответы Re: Primary key duplicates  (Zeki Mokhtarzada <zeki@freewebz.com>)
Список pgsql-bugs
Zeki Mokhtarzada <zeki@freewebz.com> writes:
> Notice that 3787433 is duplicated.  How could this have happened if that
> column is flagged as the primary key.  Even more interesting:

> select oid, fileid, userid from files where userid = 1898598 order by
> fileid;
>    oid    | fileid  | userid
> ----------+---------+---------
>   1573737 | 3787433 | 1898598
>   1573737 | 3787433 | 1898598
>   1573820 | 3787563 | 1898598
>  18612041 | 9554275 | 1898598

It would be interesting to see the ctid, xmin, cmin, and xmax fields
as well.

> I suspect a corrupt index is at fault here.

Possibly, but the duplicate OID entries suggest that a row was updated
and then for some reason the old version appears to still be valid.
(Or an attempted update was rolled back, but the new version got marked
valid anyway.)  Have you had any crashes or other strange behavior lately?

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: OpenBSD 3.5, PostgreSQL 8.0.0beta1 make fails
Следующее
От: Tom Lane
Дата:
Сообщение: Re: 8.0 beta1: pg_dump/restore failing